/* AlterEgo Calendar - Frontend Styles */

.alterego-calendar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

.alterego-calendar-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

.calendar-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    font-size: 1.1rem;
    font-weight: 600;
    color: #4A3728;
    z-index: 100;
}

.calendar-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    min-height: 50px;
}

.calendar-nav-btn {
    background: linear-gradient(135deg, #C9A961 0%, #D4AF37 100%);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201, 169, 97, 0.4);
}

.calendar-nav-btn .nav-arrow {
    font-size: 1.5rem;
    line-height: 1;
}

.calendar-year {
    font-size: 3rem;
    font-weight: 700;
    color: #4A3728;
    margin: 0;
    font-family: 'Playfair Display', serif;
    min-width: 150px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.legend-booked {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
}

.legend-available {
    background: #FAF8F3;
    border: 2px solid #C9A961;
}

/* Calendar grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.calendar-month {
    background: #fff;
    border: 2px solid rgba(201, 169, 97, 0.2);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.calendar-month:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: rgba(201, 169, 97, 0.4);
}

.month-name {
    background: linear-gradient(135deg, #3A2818 0%, #4A3728 100%);
    color: #fff;
    padding: 1rem;
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

.month-table {
    width: 100%;
    border-collapse: collapse;
}

.month-table thead th {
    background: #FAF8F3;
    color: #4A3728;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0;
    text-align: center;
    border-bottom: 1px solid rgba(201, 169, 97, 0.2);
}

.month-table tbody td {
    padding: 0;
    text-align: center;
    border: 1px solid #f0f0f0;
    height: 35px;
}

.empty-day {
    background: #fafafa;
}

.day-cell {
    cursor: default;
    position: relative;
    transition: all 0.3s ease;
}

.day-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
}

/* Day states */
.day-cell.past-day .day-number {
    color: #999;
}

.day-cell.today {
    background: #FAF8F3;
}

.day-cell.today .day-number {
    color: #C9A961;
    font-weight: 700;
}

.day-cell.booked-day {
    background: linear-gradient(135deg, #d63638 0%, #b32d2e 100%);
    position: relative;
}

.day-cell.booked-day .day-number {
    color: #fff;
    font-weight: 700;
}

.day-cell.booked-day::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
}

/* Hover effects */
.day-cell:not(.booked-day):not(.past-day):hover {
    background: #C9A961;
}

.day-cell:not(.booked-day):not(.past-day):hover .day-number {
    color: #fff;
    transform: scale(1.1);
}

.day-cell.booked-day:hover {
    background: linear-gradient(135deg, #b32d2e 0%, #d63638 100%);
}

/* Responsive design */
@media (max-width: 1200px) {
    .calendar-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

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

    .calendar-year {
        font-size: 2rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .month-name {
        font-size: 1rem;
        padding: 0.75rem;
    }

    .month-table tbody td {
        height: 30px;
    }

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

    .calendar-legend {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-year {
        font-size: 1.75rem;
    }

    .month-table tbody td {
        height: 35px;
    }
}

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

.calendar-month {
    animation: fadeIn 0.5s ease;
}

.calendar-month:nth-child(1) { animation-delay: 0.05s; }
.calendar-month:nth-child(2) { animation-delay: 0.1s; }
.calendar-month:nth-child(3) { animation-delay: 0.15s; }
.calendar-month:nth-child(4) { animation-delay: 0.2s; }
.calendar-month:nth-child(5) { animation-delay: 0.25s; }
.calendar-month:nth-child(6) { animation-delay: 0.3s; }
.calendar-month:nth-child(7) { animation-delay: 0.35s; }
.calendar-month:nth-child(8) { animation-delay: 0.4s; }
.calendar-month:nth-child(9) { animation-delay: 0.45s; }
.calendar-month:nth-child(10) { animation-delay: 0.5s; }
.calendar-month:nth-child(11) { animation-delay: 0.55s; }
.calendar-month:nth-child(12) { animation-delay: 0.6s; }
