/* 📅 Calendar Component */

/* Container for Dual View */
.age-calendar-controls {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    position: relative;
}

.age-calendar-dual-wrapper {
    display: flex;
    gap: 30px;
    width: 100%;
    justify-content: center;
}

/* Months */
.age-month {
    flex: 1;
    min-width: 320px;
    /* Prevent squashing */
}

/* Nav Buttons */
.age-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-top: 10px;
    /* Align with Month Title roughly */
}

.age-nav-btn:hover:not(:disabled) {
    background: #f7f7f7;
    border-color: #000;
}

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

/* Responsive: Single Month on Mobile */
@media (max-width: 768px) {

    /* 1. Revert: Header Container (Spacing restored) */
    .age-calendar-controls {
        display: block !important;
        position: relative !important;
        height: 60px !important;
        /* Back to 60px */
        min-height: 60px !important;
        width: 100% !important;
        background: transparent !important;
        margin: 0 0 10px 0 !important;
        /* Restore some margin */
        padding: 0 !important;
        border-bottom: 1px solid #f0f0f0;
    }

    /* 2. Arrows */
    .age-nav-btn {
        position: absolute !important;
        top: 10px !important;
        /* Back to 10px */
        z-index: 20;
        width: 40px !important;
        height: 40px !important;
    }

    .age-nav-btn.prev {
        left: 0 !important;
    }

    .age-nav-btn.next {
        right: 0 !important;
    }

    /* 3. Title */
    .age-month-title {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        line-height: 60px !important;
        /* Back to 60px */
        margin: 0 !important;
        text-align: center !important;
        font-size: 1.2rem !important;
        z-index: 10;
        pointer-events: none;
    }

    /* 4. Grid Container */
    .age-calendar-dual-wrapper {
        display: block !important;
        width: 100% !important;
        margin-top: 5px !important;
        /* Small buffer */
        padding: 0 !important;
    }

    .age-month {
        width: 100% !important;
        padding-top: 60px !important;
        /* INCREASED to clear title */
        overflow: visible !important;
        position: relative !important;
    }

    .age-month-grid {
        display: grid !important;
        grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
        gap: 2px !important;
        width: 100% !important;
    }

    /* Hide second month */
    .age-month:nth-child(2) {
        display: none !important;
    }

    .age-day {
        min-height: 44px !important;
        height: auto !important;
        font-size: 0.85rem !important;
    }
}



.age-month {
    break-inside: avoid;
}

.age-month-title {
    text-align: center;
    text-transform: capitalize;
    margin-bottom: 1rem;
    color: var(--age-text);
}

.age-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.age-day-header {
    text-align: center;
    font-size: 0.8rem;
    color: var(--age-text-muted);
    font-weight: 500;
    padding-bottom: 0.5rem;
}

.age-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    /* Stack day and price */
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    /* Square with radius */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 5px;
    color: var(--age-text);
    height: auto;
    /* Let it grow */
    min-height: 50px;
}

.age-day-price {
    font-size: 0.65rem;
    font-weight: 400;
    color: #666;
    margin-top: 2px;
}

.age-day.selected .age-day-price,
.age-day.in-range .age-day-price {
    color: rgba(255, 255, 255, 0.9);
}

.age-day:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.age-day.selected {
    background: var(--age-primary);
    color: white;
}

.age-day.range-start,
.age-day.range-end {
    background: var(--age-primary);
    color: white;
}

.age-day.in-range {
    background: #eff6ff;
    color: var(--age-secondary);
    border-radius: 0;
}

.age-day.blocked,
.age-day.orphan-blocked {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #999;
    text-decoration: line-through;
    cursor: not-allowed;
    border-color: transparent !important;
}

.age-day.orphan-gap {
    /* Sellable but warning (Info) - maybe light blue or orange border? */
    /* Lumina just handles it with Toast, visual is normal Available */
}

/* Premium Override */
.age-day:hover:not(.blocked) {
    background: var(--age-primary-light, #eff6ff);
    color: var(--age-primary);
    transform: scale(1.05);
    /* Premium Pop */
}

/* 💀 Skeletons */
.skeleton .skeleton-header {
    height: 24px;
    background: #f3f4f6;
    width: 150px;
    margin: 0 auto 15px;
    border-radius: 4px;
}

.skeleton .skeleton-body {
    height: 200px;
    background: #f3f4f6;
    border-radius: 4px;
}