/* =============================================
   CALENDAR WIDGET STYLES
   ============================================= */

.calendar-widget {
    background: var(--white, #ffffff);
    border-radius: 10px;
    overflow: hidden;
    user-select: none;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--navy-900, #0a1628);
}

.calendar-header-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white, #ffffff);
}

.calendar-nav-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--white, #ffffff);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.calendar-nav-btn:hover {
    background: rgba(255,255,255,0.2);
}

.calendar-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--gray-50, #f8fafc);
    border-bottom: 1px solid var(--gray-200, #e2e8f0);
}

.calendar-weekday {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500, #64748b);
}

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

.calendar-day {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: var(--gray-800, #1e293b);
}

.calendar-day:hover:not(.past):not(.booked):not(.blocked):not(.empty) {
    background: var(--gray-100, #f1f5f9);
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.today {
    border: 2px solid var(--gold-500, #c8a55a);
    font-weight: 700;
    animation: pulse 2s infinite;
}

.calendar-day.past {
    color: var(--gray-300, #cbd5e1);
    cursor: not-allowed;
}

.calendar-day.available {
    background: #f0fdf4;
    color: #166534;
}

.calendar-day.available:hover {
    background: #dcfce7;
}

.calendar-day.pending {
    background: #fef3c7;
    color: #92400e;
}

.calendar-day.booked {
    background: #fef2f2;
    color: #991b1b;
    cursor: not-allowed;
    position: relative;
}

.calendar-day.booked::after {
    content: '';
    position: absolute;
    inset: 4px;
    border-radius: 3px;
}

.calendar-day.blocked {
    background: var(--gray-100, #f1f5f9);
    color: var(--gray-400, #94a3b8);
    cursor: not-allowed;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(148,163,184,0.15) 3px,
        rgba(148,163,184,0.15) 6px
    );
}

.calendar-day.selected-start,
.calendar-day.selected-end {
    background: var(--blue, #3b82f6) !important;
    color: var(--white, #ffffff) !important;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.calendar-day.in-range {
    background: #dbeafe;
    color: #1e40af;
    border-radius: 2px;
}

.calendar-day.hover-range {
    background: #eff6ff;
    color: #3b82f6;
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-200, #e2e8f0);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--gray-500, #64748b);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.legend-available {
    background: #dcfce7;
}

.legend-pending {
    background: #fef3c7;
}

.legend-booked {
    background: #fecaca;
}

.legend-blocked {
    background: var(--gray-200, #e2e8f0);
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 2px,
        rgba(148,163,184,0.3) 2px,
        rgba(148,163,184,0.3) 4px
    );
}

/* Selected dates display */
.calendar-selection {
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border-top: 1px solid #bfdbfe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.calendar-selection-label {
    color: var(--gray-500, #64748b);
    font-size: 0.75rem;
}

.calendar-selection-date {
    font-weight: 600;
    color: var(--blue, #3b82f6);
}

.calendar-nights {
    text-align: center;
    padding: 0.4rem;
    font-size: 0.8rem;
    color: var(--gray-500, #64748b);
    font-weight: 500;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-day {
        font-size: 0.75rem;
    }

    .calendar-weekday {
        font-size: 0.6rem;
        padding: 0.35rem;
    }

    .calendar-legend {
        gap: 0.6rem;
    }

    .legend-item {
        font-size: 0.65rem;
    }

    .legend-color {
        width: 10px;
        height: 10px;
    }
}

/* Admin Calendar specific styles */
.admin-calendar-container {
    margin-bottom: 1.5rem;
}

.admin-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.admin-calendar-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--navy-900, #0a1628);
}

.admin-calendar-grid {
    min-height: 300px;
}

/* Animation for today pulse */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(200,165,90,0.4); }
    70% { box-shadow: 0 0 0 6px rgba(200,165,90,0); }
    100% { box-shadow: 0 0 0 0 rgba(200,165,90,0); }
}
