/* ===== پاپ‌آپ ===== */

.calendar-datetime-box {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.calendar-datetime-box.show {
    opacity: 1;
    visibility: visible;
}

.calendar-popup-content {
    background: #fff;
    border-radius: 20px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    /* transform: scale(0.9); */
    transition: transform 0.3s;
    position: relative;
    -webkit-transition: transform 0.3s;
    -moz-transition: transform 0.3s;
    -ms-transition: transform 0.3s;
    -o-transition: transform 0.3s;
}


/* .calendar-datetime-box.show .calendar-popup-content {
    transform: scale(1);
} */


/* دکمه بستن */

.close-calendar-datetime-box {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
    z-index: 10;
}

.close-calendar-datetime-box:hover {
    color: #000;
}


/* ===== ناوبری پاپ‌آپ ===== */

.popup-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 20px 0;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    color: #333;
}

.nav-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #0e57d7;
    transform: scale(1.05);
}

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


/* ===== عنوان ماه ===== */

.month-title {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-family: "Estedad";
}

.calendar-wrapper {
    padding: 0 5px;
}

.calendars-row {
    margin: 0 -5px;
}


/* تنظیمات ریسپانسیو */

@media (max-width: 768px) {
    .calendar-popup-content {
        padding: 15px;
        width: 100%;
        max-height: 95vh;
        position: absolute;
        bottom: 0 !important;
        border-radius: 15px 15px 0 0 !important;
    }
    .close-calendar-datetime-box {
        top: 10px;
        right: 15px;
        font-size: 24px;
    }
    .popup-title {
        font-size: 16px;
    }
    .nav-btn {
        width: 40px;
        height: 40px;
    }
    .month-title {
        font-size: 16px;
    }
}

.calendar-header {
    padding: 24px;
    border-bottom: 1px solid #ebebeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #ff385c 0%, #e61e4d 100%);
    color: white;
}

.calendar-day.check-out-available {
    background-color: #ffebef !important;
    border-color: #ff385c !important;
    cursor: pointer;
}

.day-unavailable {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #c13515;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 15px;
    font-weight: 600;
}

.calendar-controls button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: white;
}

.calendar-controls button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.calendar-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

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

@media screen and (max-width: 768px) {
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 13.2%);
        gap: 4px;
    }
}

.calendar-weekdays {
    display: contents;
}

.weekday {
    text-align: center;
    font-weight: 600;
    margin-bottom: 5px;
    /* height: 70px; */
    font-size: 14px;
    display: flex !important;
    color: #717171;
    border-radius: 15px;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

.calendar-days {
    display: contents;
}

.calendar-day {
    font-family: 'Iranyekan', sans-serif;
    width: 100%;
    height: 50px;
    padding: 12px 8px;
    border: 1px solid #ddd;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    justify-content: center;
    align-items: center;
    align-content: center;
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    -ms-border-radius: 15px;
    -o-border-radius: 15px;
}

@media (max-width: 968px) {
    .calendar-day {
        width: 100%;
        height: 40px;
    }
}

@media screen and (max-width: 768px) {
    .calendar-day {
        transition: 0.2s ease-in;
        width: 100% !important;
        height: 40px !important;
        -webkit-transition: 0.2s ease-in;
        -moz-transition: 0.2s ease-in;
        -ms-transition: 0.2s ease-in;
        -o-transition: 0.2s ease-in;
    }
    .day-number {
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .calendar-day {
        transition: 0.2s ease-in;
        width: 100% !important;
        height: 50px !important;
        -webkit-transition: 0.2s ease-in;
        -moz-transition: 0.2s ease-in;
        -ms-transition: 0.2s ease-in;
        -o-transition: 0.2s ease-in;
    }
    .day-number {
        font-size: 13px;
    }
}

@media only screen and (max-width: 600px) {
    .calendar-day {
        transition: 0.2s ease-in;
        width: 100% !important;
        height: 40px !important;
        -webkit-transition: 0.2s ease-in;
        -moz-transition: 0.2s ease-in;
        -ms-transition: 0.2s ease-in;
        -o-transition: 0.2s ease-in;
    }
    .day-number {
        font-size: 13px;
    }
}

.disabled {
    position: relative;
    border-radius: 15px;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    font-size: 18px;
    font-weight: bold;
    color: #333 !important;
    text-align: center;
    padding: 12px 8px;
    overflow: hidden;
    z-index: 1;
}


/* Striped background effect */

.disabled::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient( 135deg, #e0e0e0 0, #e0e0e0 2px, transparent 2px, transparent 5px);
    opacity: 0.5;
    z-index: 0;
}

.disabledeffect {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    font-size: 18px;
    font-weight: bold;
    color: #333 !important;
    text-align: center;
    padding: 12px 8px;
    overflow: hidden;
    z-index: 1;
}


/* Striped background effect */

.disabledeffect::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient( 135deg, #e0e0e0 0, #e0e0e0 2px, transparent 2px, transparent 5px);
    opacity: 0.5;
    z-index: 0;
}


/* Keep text above the stripes */

.calendar-day.empty {
    border: none;
    cursor: default;
    background: transparent;
}

.calendar-day.past {
    opacity: 0.3;
    position: relative;
    background-color: #eee !important;
    font-size: 14px;
    font-weight: bold;
    color: #333 !important;
    text-align: center;
    cursor: not-allowed;
    border-color: #eee !important;
}

.calendar-day.past::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #eee;
    z-index: 0;
}

.calendar-day.today {
    border-color: #0e57d7;
}

.calendar-day.selected {
    background-color: #ffebef;
    border-color: #ff385c;
}

.calendar-day.check-in {
    background: #0e57d7 !important;
    color: white !important;
    border-color: #113577 !important;
    z-index: 2 !important;
}

.calendar-day.check-in>span {
    color: #ffffff !important;
}

.partial-shade {
    background: linear-gradient( 138deg, rgb(255, 255, 255) 80%, rgba(255, 255, 255, 0.5) 20%), repeating-linear-gradient( -45deg, rgb(255, 255, 255), rgb(255, 255, 255) 3px, rgba(215, 215, 215, 0.5) 2px, rgba(215, 215, 215, 0.8) 7px) !important;
    cursor: pointer;
    border-color: #ddd !important;
}

.partial-shade>span {
    color: #000000 !important;
}

.calendar-day.check-out {
    background: #0e57d7 !important;
    color: white !important;
    border-color: #113577 !important;
}

.calendar-day.check-out:hover {
    color: #ffffff !important;
}

.calendar-day.in-range {
    background-color: #0e57d7 !important;
    border-color: #113577 !important;
    color: #ffffff !important;
}

.calendar-day.in-range>span {
    color: #ffffff !important;
}

.calendar-day.closed {
    background: #ffe7e7;
    border-color: #ffbcbc;
    color: #c13515;
    cursor: not-allowed;
}

.calendar-day.holiday {
    background: #fff0f0;
    border-color: #ffd6d6;
    color: #c13515;
}

.day-number {
    font-size: 16px;
    font-weight: 600;
    align-self: center;
    z-index: 1;
}

.day-price {
    font-size: 12px;
    font-weight: 600;
    align-self: center;
    z-index: 1;
}

.day-check-in {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #ff385c;
    color: white;
    font-size: 10px;
    padding: 0px 10px 3px 10px;
    border-radius: 15px;
    font-weight: 600;
    z-index: 3;
}

.day-check-out {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #ff385c;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 15px;
    font-weight: 600;
}

.selection-dates {
    font-size: 16px;
    font-weight: 600;
}

.selection-nights {
    font-size: 14px;
    color: #717171;
}

.selection-price {
    font-size: 18px;
    font-weight: 700;
    color: #ff385c;
}

@media (max-width: 768px) {
    .calendar-body {
        padding: 16px;
    }
    .day-number {
        font-size: 14px;
    }
    .day-price {
        font-size: 10px;
    }
}