/* Events Calendar Frontend Styles */

.mfs-events-calendar {
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.mfs-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 0 4px;
}

.mfs-cal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.mfs-cal-nav {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    color: #374151;
    transition: all 0.15s ease;
    line-height: 1;
}

.mfs-cal-nav:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Grid */
.mfs-cal-grid {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mfs-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.mfs-cal-weekdays span {
    padding: 10px 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.mfs-cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.mfs-cal-day {
    min-height: 90px;
    padding: 6px;
    border-right: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

.mfs-cal-day:nth-child(7n) {
    border-right: none;
}

.mfs-cal-day-number {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
    padding: 2px 4px;
}

.mfs-cal-day.mfs-cal-other-month .mfs-cal-day-number {
    color: #d1d5db;
}

.mfs-cal-day.mfs-cal-today .mfs-cal-day-number {
    background: #1a1a1a;
    color: #fff;
    border-radius: 6px;
    display: inline-block;
    min-width: 24px;
    text-align: center;
}

/* Event dots */
.mfs-cal-event {
    background: #1a1a1a;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.15s ease;
    line-height: 1.4;
}

.mfs-cal-event:hover {
    background: #374151;
}

.mfs-cal-more {
    font-size: 11px;
    color: #6b7280;
    padding: 1px 6px;
    cursor: pointer;
    font-weight: 600;
}

.mfs-cal-more:hover {
    color: #1a1a1a;
}

/* Event Detail Panel */
.mfs-cal-event-detail {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mfs-cal-detail-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
}

.mfs-cal-detail-close:hover {
    color: #1a1a1a;
}

.mfs-cal-detail-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.mfs-cal-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

.mfs-cal-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.mfs-cal-detail-desc {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
}

/* Ticket / Add to Cart */
.mfs-cal-detail-ticket {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.mfs-cal-ticket-price {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
}

.mfs-cal-buy-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #1a1a1a;
    color: #fff !important;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.15s ease;
}

.mfs-cal-buy-btn:hover {
    background: #374151;
}

/* Mobile List View */
.mfs-cal-list {
    display: none;
}

.mfs-cal-list-date-group {
    margin-bottom: 4px;
}

.mfs-cal-list-date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    padding: 10px 16px 6px;
}

.mfs-cal-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.mfs-cal-list-item:hover {
    background: #f9fafb;
}

.mfs-cal-list-color {
    width: 4px;
    min-height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
    align-self: stretch;
}

.mfs-cal-list-info {
    flex: 1;
    min-width: 0;
}

.mfs-cal-list-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
    line-height: 1.3;
}

.mfs-cal-list-time {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.3;
}

.mfs-cal-list-location {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 2px;
    line-height: 1.3;
}

.mfs-cal-list-price {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    flex-shrink: 0;
    align-self: center;
}

.mfs-cal-list-empty {
    text-align: center;
    padding: 40px 16px;
    color: #9ca3af;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

/* Responsive */
@media (max-width: 600px) {
    .mfs-events-calendar {
        box-sizing: border-box;
    }

    .mfs-events-calendar *,
    .mfs-events-calendar *::before,
    .mfs-events-calendar *::after {
        box-sizing: inherit;
    }

    .mfs-cal-title {
        font-size: 18px;
    }

    /* Hide grid, show list */
    .mfs-cal-grid {
        display: none;
    }

    .mfs-cal-list {
        display: block;
    }

    /* Detail panel */
    .mfs-cal-event-detail {
        padding: 16px;
        border-radius: 8px;
        margin-top: 12px;
    }

    .mfs-cal-detail-close {
        top: 10px;
        right: 12px;
        font-size: 20px;
    }

    .mfs-cal-detail-title {
        font-size: 16px;
        padding-right: 28px;
    }

    .mfs-cal-detail-meta {
        gap: 6px 12px;
        font-size: 12px;
    }

    .mfs-cal-detail-desc {
        font-size: 13px;
    }

    .mfs-cal-detail-ticket {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .mfs-cal-buy-btn {
        text-align: center;
    }
}
