.calendar-container {
    max-width: 1300px;
    margin: 0 auto;
    background: white;
    padding: 24px;
    position: relative;
    border-radius: 24px;
    -webkit-border-radius: 24px;
    -moz-border-radius: 24px;
    background: rgba(0, 0, 0, 0.04);
}

.calendar-wrapper {
    display: flex;
    align-items: flex-start;
    margin-left: -30px;
    margin-right: -30px;
}

.calendar-wrapper > * {
    margin-left: 30px;
    margin-right: 30px;
}

.calendar {
    flex: 1;
    min-width: 350px;
    width: 100%;
    background-color: #F8F3EC;
    border-radius: 16px;
    -webkit-border-radius: 16px;
    -moz-border-radius: 16px;
    padding: 24px;
    box-sizing: border-box;
}

.calendar-header {
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -10px;
    margin-right: -10px;
}

.calendar-header > * {
    margin-left: 10px;
    margin-right: 10px;
}

.nav-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 5px 10px;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    transition: all 0.2s ease;
}

.nav-btn i{
    font-size: 20px;
    font-weight: 800;
}

.nav-btn:hover {
    background-color: #f0f0f0;
    color: #2c2c2c;
}

.nav-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.nav-btn:disabled:hover {
    background-color: transparent;
    color: #ccc;
}

.month-title {
    font-size: 24px;
    font-weight: 500;
    color: #202020;
    min-width: 200px;
    margin: 0;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 15px;
    margin-left: -4px;
    margin-right: -4px;
}

.weekday {
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    padding: 10px 4px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    display: block;
}

.day > span {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 500;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
}

.day:hover:not(.other-month):not(.booked):not(.disabled) > span {
    /*background-color: #f0f0f0;*/
}

.day.other-month > span {
    color: #ccc;
    cursor: default;
}

.day.other-month:hover > span {
    background: transparent;
}

/* Override other-month styling when it's part of selection */
.day.other-month.check-in > span,
.day.other-month.check-out > span {
    color: white;
    cursor: pointer;
}

.day.other-month.in-range > span {
    color: #2c2c2c;
    cursor: default;
}

.day.booked > span {
    color: #ef4444;
    cursor: default;
}

/* Tanggal yang sudah lewat (bulan berjalan) — tampak tidak tersedia */
.day.disabled > span {
    color: #cfcfcf;
    cursor: not-allowed;
    text-decoration: line-through;
    -webkit-text-decoration-color: rgba(0, 0, 0, 0.18);
    text-decoration-color: rgba(0, 0, 0, 0.18);
}

.day.disabled:hover > span {
    background: transparent;
}

.day.check-in > span,
.day.check-out > span {
    background-color: #2c2c2c;
    color: white;
    width: 40px;
    height: 40px;
    line-height: 40px;
    margin: auto;
}

.day.check-in:hover > span,
.day.check-out:hover > span {
    background-color: #1a1a1a;
}

.day.in-range > span {
    background: rgba(0, 0, 0, 0.04);
    color: #2c2c2c;
    border-radius: 8px !important;
    -webkit-border-radius: 8px !important;
    -moz-border-radius: 8px !important;
}

.day.in-range > span::before {
    display: none;
}

.day.in-range > span > span {
    position: relative;
    z-index: 2;
}

.legend {
    display: flex;
    align-items: center;
    border-top: 1px solid #eee;
    margin-left: -8px;
    margin-right: -8px;
}

.legend > * {
    margin-left: 8px;
    margin-right: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.legend-item > *:first-child {
    margin-right: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
}

.legend-dot.available {
    background-color: #2c2c2c;
}

.legend-dot.booked {
    background-color: #ef4444;
}

.legend-line {
    width: 20px;
    height: 2px;
    background-color: #999;
}

.booking-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    background-color: #F8F3EC;
    border-radius: 99999px;
    -webkit-border-radius: 99999px;
    -moz-border-radius: 99999px;
    text-align: center;
    margin-top: 16px;
}

.booking-info h3 {
    color: #2c2c2c;
    margin-bottom: 10px;
}

.booking-info p {
    color: #666;
    margin-bottom: 5px;
}

.booking-button {
    background: #2c2c2c;
    color: white;
    border: none;
    padding: 24px 40px;
    border-radius: 50px;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-button:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
}

.booking-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

@media (max-width: 991px) {
    .calendar-wrapper {
        flex-direction: column;
        /* hapus negative margin gutter desktop agar kalender pas di dalam container */
        margin-left: 0;
        margin-right: 0;
    }

    .calendar-wrapper > * {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .calendar-wrapper > *:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .calendar-container {
        padding: 12px;
        margin-top: 16px;
        border-radius: 18px;
    }

    .calendar {
        padding: 14px 10px;
        min-width: 100%;
        box-sizing: border-box;
        transition: all 0.3s ease;
    }

    .calendar-header {
        margin-bottom: 12px;
        justify-content: space-between;
    }
    
    .nav-btn {
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background-color: rgba(0,0,0,0.05);
        border-radius: 50%;
        -webkit-border-radius: 50%;
        -moz-border-radius: 50%;
    }
    
    .nav-btn.next-mobile {
        display: flex !important;
    }
    
    .month-title {
        font-size: 17px;
        min-width: 0;
    }

    .weekdays {
        margin-bottom: 8px;
    }

    .weekday {
        font-size: 12px;
        padding: 6px 2px;
        color: #8a8a8a;
    }

    .days-grid {
        margin-left: 0;
        margin-right: 0;
    }

    .days-grid > * {
        padding-left: 0;
        padding-right: 0;
    }

    /* Sel sedikit lebih pendek agar kalender ringkas & rapih di layar kecil */
    .day {
        padding-bottom: 86%;
    }

    .day > span {
        font-size: 15px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    /* Tanggal lewat: cukup redup (tanpa coretan) supaya bersih di mobile */
    .day.disabled > span {
        text-decoration: none;
        color: #cdcdcd;
    }

    /* Lingkaran check-in / check-out menyesuaikan ukuran sel kecil */
    .day.check-in > span,
    .day.check-out > span {
        width: 34px;
        height: 34px;
        line-height: 34px;
    }

    .day.in-range > span {
        border-radius: 7px !important;
        -webkit-border-radius: 7px !important;
        -moz-border-radius: 7px !important;
    }
    
    /* Animation for calendar changes */
    .fade-transition {
        animation: fadeEffect 0.3s ease-in-out;
    }
    
    @keyframes fadeEffect {
        0% { opacity: 0.7; transform: scale(0.98); }
        100% { opacity: 1; transform: scale(1); }
    }
    
    /* Fix for booking info section on mobile */
    .booking-info {
        padding: 16px;
        flex-direction: column;
        border-radius: 16px;
        -webkit-border-radius: 16px;
        -moz-border-radius: 16px;
        margin-left: -8px;
        margin-right: -8px;
    }

    .booking-info > * {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 16px;
    }

    .booking-info > *:last-child {
        margin-bottom: 0;
    }
    
    .legend {
        width: 100%;
        justify-content: center;
        padding: 10px 0;
    }
    
    .booking-button {
        width: 100%;
        padding: 15px 20px;
        box-sizing: border-box;
    }
}

/* Fix for nav buttons on all screens */
.nav-btn {
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.nav-btn:active {
    transform: scale(0.95);
    background-color: rgba(0,0,0,0.1);
}

.nav-btn.next-mobile {
    display: none;
}

@media (max-width: 768px) {
    .nav-btn.next-mobile {
        display: flex;
    }
}

/* Add these styles at the end of your calendar.css file */

/* Ripple effect for touch feedback */
.day {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    transform: scale(0);
    animation: ripple 0.5s linear;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

@keyframes ripple {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Pulse animation for booking info section */
.pulse-highlight {
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}