/* Airbnb Calendar Styles - Josefin Sans Font */
@import url('https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@300;400;500;600&display=swap');

.airbnb-calendar-wrapper {
    font-family: "Josefin Sans", sans-serif;
    max-width: none;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Styles */
.airbnb-calendar-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    padding: 15px 20px;
    background: #ffffff;
    gap: 20px;
}

.nav-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #495057;
    flex-shrink: 0;
}

.nav-btn svg {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2.5;
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

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

.nav-period {
    text-align: center;
    min-width: 250px;
    margin: 0 15px;
}

.period-text {
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    display: block;
    margin-bottom: 8px;
}

.nav-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background: #4CAF50;
    transform: scale(1.2);
}

.dot:hover {
    background: #adb5bd;
}

.airbnb-calendar-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 0;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

.airbnb-month {
    background: #ffffff;
    border-radius: 0;
    padding: 12px;
    box-shadow: none;
    border: 1px solid #e3e3e3;
    flex: 0 0 auto;
    min-width: 0;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.airbnb-month.hidden {
    display: none;
    opacity: 0;
}

.airbnb-month h3 {
    text-align: center;
    margin: 0 0 12px 0;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    font-family: "Josefin Sans", sans-serif;
}

.airbnb-calendar {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2px;
    font-family: "Josefin Sans", sans-serif;
}

.airbnb-calendar thead th {
    background: none;
    color: #666666;
    padding: 4px 2px;
    text-align: center;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.airbnb-calendar tbody td {
    width: 14.28%;
    height: 28px;
    text-align: center;
    vertical-align: middle;
    border-radius: 4px;
    transition: all 0.2s ease;
    position: relative;
    font-size: 13px;
    font-weight: 400;
    padding: 2px;
}

.airbnb-calendar tbody td span {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 24px;
    border-radius: 4px;
}

.airbnb-calendar tbody td.empty {
    background: transparent;
    cursor: default;
}

.airbnb-calendar tbody td.available {
    background-color: #e8f5e8;
    color: #2d5a2d;
}

.airbnb-calendar tbody td.booked {
    background: repeating-linear-gradient(
        45deg,
        #ffebee,
        #ffebee 3px,
        #ffcdd2 3px,
        #ffcdd2 6px
    );
    color: #666666;
    position: relative;
}

.airbnb-calendar tbody td.today {
    border: 2px solid #4CAF50;
    font-weight: 600;
}

.airbnb-calendar tbody td.today.available {
    background-color: #c8e6c8;
}

.airbnb-calendar tbody td.today.booked {
    border-color: #f44336;
}

/* Past days - greyed out with opacity and striped pattern for booked */
.airbnb-calendar tbody td.past.available {
    background-color: #f5f5f5;
    color: #bdbdbd;
    opacity: 0.5;
}

.airbnb-calendar tbody td.past.booked {
    background: repeating-linear-gradient(
        45deg,
        #e0e0e0,
        #e0e0e0 3px,
        #d0d0d0 3px,
        #d0d0d0 6px
    );
    color: #9e9e9e;
    opacity: 0.6;
}

/* Unknown dates (beyond last known iCal date) - greyed out to indicate no data */
.airbnb-calendar tbody td.unknown.available {
    background-color: #f5f5f5 !important;
    color: #bdbdbd !important;
    opacity: 0.5 !important;
}

.airbnb-calendar tbody td.unknown.booked {
    background: repeating-linear-gradient(
        45deg,
        #e0e0e0,
        #e0e0e0 3px,
        #d0d0d0 3px,
        #d0d0d0 6px
    ) !important;
    color: #9e9e9e !important;
    opacity: 0.6 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .airbnb-calendar-wrapper {
        padding: 15px;
    }
    
    .airbnb-calendar-navigation {
        margin-bottom: 20px;
        padding: 12px 15px;
        gap: 15px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .nav-btn svg {
        width: 18px !important;
        height: 18px !important;
    }
    
    .nav-period {
        margin: 0 10px;
        min-width: 200px;
    }
    
    .period-text {
        font-size: 16px;
    }
    
    .airbnb-calendar-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0;
    }

    .airbnb-month {
        padding: 10px;
        min-width: auto;
        max-width: none;
    }

    .airbnb-month h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .airbnb-calendar thead th {
        padding: 3px 1px;
        font-size: 10px;
    }

    .airbnb-calendar tbody td {
        height: 24px;
        font-size: 11px;
        padding: 1px;
    }

    .airbnb-calendar tbody td span {
        line-height: 22px;
    }
}

@media (max-width: 480px) {
    .airbnb-calendar-wrapper {
        padding: 10px;
    }
    
    .airbnb-calendar-navigation {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .nav-btn svg {
        width: 16px !important;
        height: 16px !important;
    }
    
    .nav-period {
        margin: 0 8px;
        min-width: 180px;
    }
    
    .period-text {
        font-size: 14px;
    }
    
    .airbnb-month {
        padding: 8px;
    }

    .airbnb-calendar tbody td {
        height: 22px;
        font-size: 10px;
        padding: 1px;
    }

    .airbnb-calendar tbody td span {
        line-height: 20px;
    }
}

/* Animation for loading state */
.airbnb-calendar.loading {
    opacity: 0.6;
    pointer-events: none;
}

.airbnb-calendar.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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