/**
 * Event Calendar Styles
 * Modern, responsive calendar with 7/14/31 day views
 */

.calendar-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Controls */
.calendar-controls {
    margin-bottom: 2rem;
}

.calendar-header {
    margin-bottom: 1.5rem;
}

.calendar-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.calendar-title svg {
    color: #0066cc;
}

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

/* View Mode Selector */
.view-mode-selector {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-view {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: #666;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-view:hover {
    background: #f0f0f0;
    color: #333;
}

.btn-view.active {
    background: #0066cc;
    color: white;
}

/* Navigation */
.calendar-navigation {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-nav {
    width: 36px;
    height: 36px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: #f0f0f0;
    border-color: #0066cc;
}

.btn-nav svg {
    color: #666;
}

.btn-nav:hover svg {
    color: #0066cc;
}

.period-label {
    font-weight: 600;
    font-size: 1.1rem;
    color: #333;
    min-width: 180px;
    text-align: center;
}

.btn-today {
    padding: 0.5rem 1rem;
    border: 1px solid #0066cc;
    background: white;
    color: #0066cc;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-today:hover {
    background: #0066cc;
    color: white;
}

/* Filters */
.calendar-filters {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    flex-wrap: wrap;
}

.search-input,
.filter-select {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.search-input {
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-select {
    min-width: 150px;
}

.btn-reset-filters {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset-filters:hover {
    background: #f8f9fa;
    border-color: #999;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    gap: 1px;
    background: #e0e0e0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day-header {
    background: #0066cc;
    color: white;
    text-align: center;
    padding: 1rem 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 0.75rem;
    position: relative;
    transition: all 0.2s;
}

.calendar-day.empty {
    background: #f8f9fa;
    min-height: 120px;
}

.calendar-day.today {
    background: #e6f3ff;
    border: 2px solid #0066cc;
}

.calendar-day:not(.empty):hover {
    background: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.day-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.calendar-day.today .day-number {
    color: #0066cc;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.no-events {
    font-size: 0.8rem;
    color: #999;
    font-style: italic;
    text-align: center;
    margin-top: 1rem;
}

/* Event Items */
.event-item {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
}

.event-item:hover {
    background: #e6f3ff;
    transform: translateX(2px);
}

.event-time {
    font-size: 0.75rem;
    color: #666;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.event-title {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
    line-height: 1.3;
}

.event-more {
    font-size: 0.8rem;
    color: #0066cc;
    font-weight: 600;
    text-align: center;
    padding: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}

.event-more:hover {
    background: #e6f3ff;
    border-radius: 4px;
}

/* Event Tooltip */
.event-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
}

.event-item:hover .event-tooltip {
    display: block;
}

.event-tooltip h4 {
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    font-size: 1.1rem;
}

.event-subtitle {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.event-details {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.event-details p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #333;
}

.event-intro {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.event-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.tag {
    background: #0066cc;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
}

.btn-details {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-details:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

/* Modal */
.event-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
    margin: 0;
    color: #1a1a1a;
    font-size: 1.5rem;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(80vh - 100px);
    overflow-y: auto;
}

/* Event Card (in modal) */
.event-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.event-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-card-header h4 {
    margin: 0 0 0.5rem 0;
    color: #1a1a1a;
    font-size: 1.3rem;
}

.event-card-body {
    margin: 1rem 0;
}

.event-card-body p {
    margin: 0.5rem 0;
    color: #333;
}

.price-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    margin-top: 0.5rem;
}

.event-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.btn-primary {
    padding: 0.75rem 1.5rem;
    background: #0066cc;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 102, 204, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .calendar-filters {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .calendar-container {
        padding: 1rem;
    }

    .calendar-title {
        font-size: 1.4rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr) !important;
        gap: 2px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 0.4rem;
    }

    .day-number {
        font-size: 0.9rem;
    }

    .event-title {
        font-size: 0.75rem;
    }

    .event-time {
        font-size: 0.65rem;
    }

    .event-tooltip {
        min-width: 250px;
    }

    .period-label {
        font-size: 0.95rem;
        min-width: 140px;
    }

    .view-mode-selector {
        width: 100%;
        justify-content: center;
    }

    .calendar-navigation {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 60px;
        padding: 0.3rem;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .event-item {
        padding: 0.3rem;
    }

    .event-title,
    .event-time {
        display: none;
    }

    .event-item::after {
        content: '●';
        color: #0066cc;
        font-size: 1.2rem;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* Loading State */
.calendar-loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.calendar-loading::after {
    content: '⏳';
    font-size: 2rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error {
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c2c7;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}
