.mec-calendar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.mec-calendar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    flex-wrap: wrap;
}

.mec-calendar-header h2 {
    margin: 0;
    font-size: 18px;
    flex: 1;
    text-align: center;
}

.mec-nav-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.mec-nav-btn:hover {
    background: #e9ecef;
}

.mec-today-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 13px;
}

.mec-today-btn:hover {
    background: #005a87;
}

.mec-view-switcher {
    display: flex;
    gap: 4px;
}

.mec-view-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 12px;
}

.mec-view-btn.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.mec-calendar-body {
    padding: 0;
    min-height: 400px;
}

.mec-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.mec-month-grid .mec-day-header {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

.mec-month-grid .mec-day-cell {
    min-height: 100px;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee;
    padding: 4px;
    font-size: 12px;
    vertical-align: top;
}

.mec-month-grid .mec-day-cell:nth-child(7n) {
    border-right: none;
}

.mec-month-grid .mec-day-cell.other-month {
    background: #fafafa;
    color: #999;
}

.mec-month-grid .mec-day-cell.today {
    background: #e8f4fd;
}

.mec-month-grid .mec-day-number {
    font-weight: 600;
    margin-bottom: 4px;
}

.mec-month-grid .mec-day-cell.today .mec-day-number {
    background: #0073aa;
    color: #fff;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.mec-event-dot {
    display: block;
    padding: 2px 6px;
    margin-bottom: 2px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.mec-event-dot:hover {
    opacity: 0.85;
}

.mec-week-grid {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
}

.mec-week-grid .mec-time-column {
    border-right: 1px solid #ddd;
}

.mec-week-grid .mec-time-slot {
    height: 48px;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    color: #666;
    text-align: right;
    padding: 2px 6px 0 0;
}

.mec-week-grid .mec-day-column {
    border-right: 1px solid #eee;
    position: relative;
}

.mec-week-grid .mec-day-column-header {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.mec-week-grid .mec-day-column-header.today {
    background: #e8f4fd;
    color: #0073aa;
}

.mec-week-grid .mec-event-block {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #fff;
    overflow: hidden;
    cursor: pointer;
    z-index: 1;
}

.mec-day-grid {
    display: grid;
    grid-template-columns: 60px 1fr;
}

.mec-day-grid .mec-time-slot {
    height: 48px;
    border-bottom: 1px solid #eee;
    font-size: 11px;
    color: #666;
    text-align: right;
    padding: 2px 6px 0 0;
}

.mec-day-grid .mec-day-events {
    position: relative;
    border-left: 1px solid #ddd;
}

.mec-day-grid .mec-event-block {
    position: absolute;
    left: 4px;
    right: 4px;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    color: #fff;
    overflow: hidden;
    cursor: pointer;
}

.mec-list-view {
    padding: 0;
}

.mec-list-view .mec-list-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
}

.mec-list-view .mec-list-item:hover {
    background: #f8f9fa;
}

.mec-list-view .mec-list-date {
    min-width: 100px;
    font-weight: 600;
    font-size: 13px;
}

.mec-list-view .mec-list-title {
    flex: 1;
    font-size: 14px;
}

.mec-list-view .mec-list-title a {
    color: #333;
    text-decoration: none;
}

.mec-list-view .mec-list-title a:hover {
    color: #0073aa;
}

.mec-list-view .mec-list-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    color: #fff;
}

.mec-list-view .mec-list-organizer {
    font-size: 12px;
    color: #666;
    min-width: 120px;
}

.mec-event-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mec-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
}

.mec-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.mec-modal-close:hover {
    color: #000;
}

.mec-modal-body h3 {
    margin-top: 0;
}

.mec-modal-body .mec-modal-meta {
    margin: 12px 0;
    font-size: 13px;
    color: #555;
}

.mec-modal-body .mec-modal-meta p {
    margin: 4px 0;
}

.mec-modal-body .mec-modal-link {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.mec-modal-body .mec-modal-link:hover {
    background: #005a87;
}

.mec-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mec-no-events {
    text-align: center;
    padding: 40px;
    color: #999;
}

@media (max-width: 768px) {
    .mec-month-grid .mec-day-cell {
        min-height: 60px;
    }

    .mec-week-grid {
        grid-template-columns: 40px repeat(7, 1fr);
    }

    .mec-list-view .mec-list-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .mec-view-switcher {
        width: 100%;
        justify-content: center;
    }
}
