/* Стили для #calendar-widget */
#calendar {
    box-shadow: 0 0 6px 3px rgba(0, 0, 0, .24);
    border-radius: 3px;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}


.column {
    float: left;
    width: 50%;
    padding: 10px;
    height: 25rem;
    min-width: 300px;
    flex: 50%;
    max-width: 26rem;
    padding: 1rem;
}

.calendar-day-header {
    display: flex;
}

.calendar-day-header-cell {
    padding: 5px;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 54.5px;
}

.calendar-day-num {
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    line-height: 20px;
    height: 36px;
}

.calendar-day-price {
    font-size: 10px;
    font-weight: 500;
    text-align: center;
    line-height: 14px;
    color: #808080;
}

.month-header {
    color: #3d3d3d;
    font-weight: 700;
    text-align: center;
    font: 12px / 14px Arial;
    margin-bottom: 15px;
    font-size: .75rem;
    line-height: .1125rem;
    text-align: center;
}

.weekend {
    color: #fc6745;
}


.calendar-navigation-horizontal {
    position: absolute;
    min-width: 870px;
}

.calendar-navigation-vertical{
    display: none;
}

.month-navigation-prev {
    margin: 25px;
    margin-top: 25px;
    margin-right: 25px;
    float: left;
    background: transparent;
    border: 0;
    border-radius: var(--button-border-radius);
    color: rgb(var(--popup-link-color));
    cursor: pointer;
}

.month-navigation-next {
    margin: 25px;
    margin-top: 25px;
    margin-left: 25px;
    float: right;

    background: transparent;
    border: 0;
    border-radius: var(--button-border-radius);
    color: rgb(var(--popup-link-color));
    cursor: pointer;
    z-index: 2;
}



.month-navigation-up {
    float: right;
    background: transparent;
    border: 0;
    border-radius: var(--button-border-radius);
    color: rgb(var(--popup-link-color));
    cursor: pointer;
    transform: rotate(90deg);
    margin: 0px;
    margin-right: 15px;
    margin-top: 25px;
}

.month-navigation-down {
    margin: 0px;
    margin-right: 15px;
    margin-bottom: 25px;
    float: right;
    background: transparent;
    border: 0;
    border-radius: var(--button-border-radius);
    color: rgb(var(--popup-link-color));
    cursor: pointer;
    z-index: 2;
    transform: rotate(90deg);
}



.calendar-day {
    pointer-events: all;
    cursor: default;
    color: #bdbdbd;
    background: transparent;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 60px;
    max-width: 54.5px;
    padding: .25rem;
    position: relative;
    width: 14.2857142857%;
    border-radius: 3px;
}

.calendar-day.disabled {
    background-color: rgba(153, 153, 153, 0.1);
    box-shadow: 1px 1px #fff, inset 1px 0 #fff, inset 0 1px #fff;
}

.calendar-day.disabled-checkin {
    background-color: rgba(153, 153, 153, 0.1);
    box-shadow: 1px 1px #fff, inset 1px 0 #fff, inset 0 1px #fff;
}

.calendar-day.enabled {
    box-shadow: 1px 1px #f3f3f3, inset 1px 0 #f3f3f3, inset 0 1px #f3f3f3;
    color: #414141;
    cursor: pointer;
}

.selected {
    background-color: #0f172b;
    background-color: rgba(15,23,43, 1) !important;
    color: #fff !important;
}

.selected > .calendar-day-price {
    color: #fff !important;
}

.hovered {
    background-color: #505664;
    color: #fff !important;
}

.hovered > .calendar-day-price {
    color: #fff !important;
}

.calendar-month-row {
    display: flex;
    flex-wrap: wrap;
    margin-top: 15px;
}

.calendar-week-row {
    display: flex;
    flex-wrap: wrap;
}

.calendar-month-row:after {
    content: "";
    display: table;
    clear: both;
}

.month-header-caption {
    font-size: 16px;
    font-weight: bold;
}


.calendar-bottom{
    margin-top: 15px;
    margin-left: 20px;
    margin-bottom: 15px;
}

.calendar-bottom-description > p {
    margin-bottom: 1px!important;
}

.calendar-bottom-caption{
    font-size: 14px;
}

.calendar-bottom-description{
    color: darkgrey;
    font-size: 12px;
    line-height: 16px;
}

.calendar-day-header-cell {
    font: 12px / 14px Arial;
}

.month {
    min-width: 425px;
}


#calendar-widget {
    background: none;
    width: fit-content;
    height: fit-content;
    margin: auto;
    border-radius: 3px;
    box-shadow: 0 0 6px 3px rgba(0, 0, 0, .24);
    position: absolute;
    /* top: 590px; */
    left: 50%;
    transform: translate(-50%);
}

#calendar-widget .modal-dialog {
    width: fit-content;
    margin: 0px;
}

#calendar-widget .modal-content {
    border: none;
    width: fit-content;
}

#calendar-widget .calendar-widget-inner {
    min-width: 870px;
}

#calendar-widget .calendar-bottom {
    margin-top: 15px;
    margin-left: 20px;
    margin-bottom: 15px;
}

#calendar-widget .calendar-bottom-caption {
    font-size: 14px;
}

#calendar-widget .calendar-bottom-description {
    color: darkgrey;
    font-size: 12px;
    line-height: 16px;
}

#calendar-widget .calendar-bottom-description > p {
    margin-bottom: 1px !important;
}



/* Добавляем треугольник для .selected */
.calendar-day.selected.first-day::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 30px 0 30px 10px; /* 30px — половина высоты (60px/2), 20px — ширина треугольника */
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.5); /* Белый с прозрачностью 50% */
}

/* Добавляем треугольник для .selected.last-day */
.calendar-day.selected.last-day::before {
    content: '';
    position: absolute;
    right: 0; /* Перемещаем на правый край */
    top: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 30px 10px 30px 0; /* Меняем направление: 10px справа, 0 слева */
    border-color: transparent rgba(255, 255, 255, 0.5) transparent transparent; /* Цвет теперь справа */
}

/* Общие стили для custom-backdrop */
.custom-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1050; /* Должен быть ниже z-index модального окна (1050), но выше остального контента */
    width: 100vw;
    height: 100vh;
    background-color: #000;
    --bs-backdrop-zindex: 1050;
    --bs-backdrop-bg: #000;
    --bs-backdrop-opacity: 0.5;
    z-index: var(--bs-backdrop-zindex);
}

.calendar-select__button-container {
    display: flex;
}

.calendar-select__button {
    color: white;
    -ms-flex-pack: center;
    -ms-flex-align: center;
    align-items: center;
    border-radius: 3px;
    cursor: pointer;
    display: -ms-inline-flexbox;
    display: inline-flex;
    font-size: 14px;
    height: 40px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    text-align: center;
    background-color: #0f172b;
    width: 104px;
    margin: auto;
}



@media (min-width: 576px) {
    #calendar-widget > .modal-dialog {
        max-width: 870px;
        margin-right: auto;
        margin-left: auto;

    }
}




@media (max-width: 880.5px) {
    .month {
        margin: auto;
    }

    .calendar-day {
        width: 13.286%;
    }

    .month {
        min-width: 360px;
    }

    .calendar-day-header-cell {
        width: 13.286%;
    }

    /* Backdrop для #calendar-widget (полная прозрачность) */
    .calendar-widget-backdrop {
        opacity: 0.5;
    }

}



@media (max-width: 880.5px) {
    #calendar-widget .calendar-widget-inner {
        min-width: 360px;
        width: min-content;
    }

    #calendar-widget .modal-body {
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }

    #calendar-widget {
        top: 10px;
        transform: none;
        left: 0%;
    }


    .calendar-navigation-horizontal {
        display: none;
        position: absolute;
        min-width: 450px;
    }
    .calendar-navigation-vertical{
        display: block;
        position: absolute;
        right:0px;
    }



    .month{
        margin: auto;
    }

    .calendar-day{
        width: 13.286%;
    }

    .month {
        min-width: 360px;
    }

    .calendar-day-header-cell{
        width: 13.286%;
    }


    #calendar-widget .modal-dialog {
        position: fixed;
        max-height: calc(100vh - 40px);
        width: auto;
        margin: 0;
        display: flex;
        flex-direction: column;
        left: 50%;
        transform: translateX(-50%);
    }

    #calendar-widget .modal-content {
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    #calendar-widget .modal-body {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        flex: 1;
    }

}

/* Медиа-запросы для #calendar-widget */
@media (min-width: 880.5px) {
    /* Backdrop для #calendar-widget (полная прозрачность) */
    .calendar-widget-backdrop {
        opacity: 0.2 !important;
    }

}




@media (max-width: 950px) {
    #calendar-widget .modal-dialog {
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
        /*width: 100%;*/
    }

    #calendar-widget .modal-content {
        width: fit-content;
    }
}

#progress-container {
    width: 95%;
    height: 2px;
    background-color: #f0f0f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
    margin: auto;
}

#progress-bar {
    width: 0;
    height: 100%;
    background-color: #0f172b;
    border-radius: 2px;
}