/* Calendar styles for EHDS Dance Studio */

.calendar-container {
    max-width: 800px;
    margin: 0 auto 40px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.calendar-header {
    background: linear-gradient(to right, #ffccd5, #ffb6c1);
    color: #333;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 20px;
}

.month-year {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
}

.nav-button {
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    font-size: 1.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.today-button {
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #333;
    transition: all 0.2s;
}

.today-button:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

.calendar-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 12px;
    font-size: 0.85rem;
    color: #555;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.legend-color.class {
    background-color: #af4bb2; /* Purple for classes */
}

.legend-color.event {
    background-color: #14b8a6; /* Teal for events */
}

.legend-color.today {
    background-color: #ffccd5;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: #fff4f6;
    border-bottom: 1px solid #ffccd5;
}

.weekday {
    padding: 5px;
    text-align: center;
    font-weight: 600;
    font-size: 0.7rem;
    color: #ff99a4;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background-color: white;
}

.calendar-day {
    min-height: 30px;
    border: 1px solid #eee;
    padding: 2px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.2s;
    font-size: 0.8rem;
}

.calendar-day:hover {
    background-color: #fff9fa;
}

.calendar-day.empty {
    background-color: #f9f9f9;
}

.calendar-day.today {
    background-color: #fff4f6;
    border: 1px solid #ffccd5;
}

.calendar-day.has-events {
    cursor: pointer;
}

.day-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-weight: 500;
    color: #555;
}

.today .day-number {
    background-color: #ffccd5;
    color: #333;
    border-radius: 50%;
    font-weight: 700;
}

.event-indicators {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    justify-content: center;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.class-indicator {
    background-color: #af4bb2; /* Purple for classes */
}

.event-indicator {
    background-color: #14b8a6; /* Teal for events */
}

.event-previews {
    margin-top: 10px;
    font-size: 0.7rem;
}

.event-preview {
    padding: 3px 5px;
    margin-bottom: 2px;
    border-radius: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.class-preview {
    background-color: #f8eef8;
    color: #9333ea;
}

.event-preview {
    background-color: #e6faf8;
    color: #0d9488;
}

.more-events {
    font-size: 0.65rem;
    text-align: center;
    color: #888;
    margin-top: 2px;
}

/* Modal styles */
.event-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    background: linear-gradient(to right, #ffccd5, #ffb6c1);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-date {
    color: #333;
    font-weight: 700;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.event-section {
    margin-bottom: 25px;
}

.event-section-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.section-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.classes-icon {
    background-color: #af4bb2;
}

.events-icon {
    background-color: #14b8a6;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.event-item {
    background-color: white;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.event-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.class-item {
    border-left: 4px solid #af4bb2;
    background-color: #fdf8fd;
}

.event-item {
    border-left: 4px solid #14b8a6;
    background-color: #f0fdfb;
}

.event-title {
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.class-item .event-title {
    color: #8823a9;
}

.event-item .event-title {
    color: #0d9488;
}

.event-description {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 12px 0;
}

.event-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.event-time, .event-instructor, .event-level {
    display: flex;
    align-items: center;
    gap: 5px;
}

.class-item .event-time, 
.class-item .event-instructor, 
.class-item .event-level {
    color: #8823a9;
}

.event-item .event-time {
    color: #0d9488;
}

.icon {
    fill: currentColor;
}

.event-action {
    margin-top: 15px;
}

.book-button {
    display: inline-block;
    padding: 8px 15px;
    background-color: #ffccd5;
    color: #333;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.book-button:hover {
    background-color: #ffb6c1;
}

.class-item .book-button {
    background-color: #e9d5ff;
    color: #8823a9;
}

.class-item .book-button:hover {
    background-color: #dbb8ff;
}

.event-item .book-button {
    background-color: #ccfbf1;
    color: #0d9488;
}

.event-item .book-button:hover {
    background-color: #99f6e4;
}

/* Responsive styles */
@media (max-width: 768px) {
    .calendar-header {
        flex-direction: column;
        gap: 10px;
    }

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

    .event-previews {
        display: none;
    }

    .calendar-weekdays, .calendar-days {
        font-size: 0.8rem;
    }

    .event-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .calendar-legend {
        flex-wrap: wrap;
    }

    .legend-item {
        margin: 5px;
    }

    .calendar-day {
        min-height: 60px;
        padding: 5px;
    }

    .day-number {
        width: 24px;
        height: 24px;
        font-size: 0.8rem;
    }

    .calendar-header {
        padding: 10px;
    }

    .month-year {
        font-size: 1.2rem;
    }
}