/* CHINATRAVEL SAMO DATE STATUS — PUBLIC */

.ct-samo-date-statuses {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.ct-samo-date-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    line-height: 15px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.ct-samo-date-badge--gds {
    background: #e8f1ff;
    color: #1858a5;
    border: 1px solid #b8d2f3;
}

.ct-samo-date-badge--block {
    background: #e9f7ed;
    color: #176b35;
    border: 1px solid #b8ddc3;
}

.ct-samo-date-badge--few {
    background: #fff2df;
    color: #a04c00;
    border: 1px solid #efc88f;
}

@media (max-width: 767px) {

    .ct-samo-date-statuses {
        margin-top: 4px;
    }

    .ct-samo-date-badge {
        padding: 1px 5px;
        font-size: 9px;
        line-height: 14px;
    }
}


/* =========================================================
   CHINATRAVEL SAMO DATE STATUS CENTER V2
   ========================================================= */

/* Дата в первой колонке */
.online-tour table tbody td:first-child {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Контейнер статусов под датой */
.online-tour .ct-samo-date-statuses {
    display: flex !important;
    width: 100% !important;

    justify-content: center !important;
    align-items: center !important;

    flex-wrap: wrap !important;
    gap: 4px !important;

    margin: 4px auto 0 !important;
    padding: 0 !important;

    text-align: center !important;
    box-sizing: border-box !important;
}

/* Сами плашки */
.online-tour .ct-samo-date-statuses > * {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    margin: 0 !important;
    text-align: center !important;
}

/* /CHINATRAVEL SAMO DATE STATUS CENTER V2 */



/* =========================================================
   CHINATRAVEL ROOM TOOLTIP V1
   ========================================================= */

.online-tour th .ct-room-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    vertical-align: middle;
}

.online-tour th .ct-room-help__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid #b9c6d2;
    border-radius: 50%;
    background: #f5f8fb;
    color: #4f6475;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    cursor: help;
    box-sizing: border-box;
}

.online-tour th .ct-room-help__tip {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%);
    min-width: 170px;
    max-width: 220px;
    padding: 8px 10px;
    background: #2d3640;
    color: #fff;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
    white-space: normal;
    border-radius: 4px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 50;
    transition: opacity .18s ease, visibility .18s ease;
    box-sizing: border-box;
}

.online-tour th .ct-room-help__tip:after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #2d3640;
}

.online-tour th .ct-room-help:hover .ct-room-help__tip,
.online-tour th .ct-room-help:focus-within .ct-room-help__tip {
    opacity: 1;
    visibility: visible;
}

.online-tour th .ct-room-help__button {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: help;
    line-height: 1;
}

.online-tour th .ct-room-help__button:focus {
    outline: none;
}

.online-tour th .ct-room-help__button:focus .ct-room-help__icon {
    box-shadow: 0 0 0 2px rgba(31, 95, 153, .22);
    border-color: #1f5f99;
}

@media (max-width: 767px) {

    .online-tour th .ct-room-help__tip {
        min-width: 150px;
        max-width: 180px;
        font-size: 10px;
    }
}

/* /CHINATRAVEL ROOM TOOLTIP V1 */



/* =========================================================
   CHINATRAVEL SAMO TABLE POLISH V1
   ========================================================= */

/* Общая аккуратность таблицы */
.online-tour table {
    table-layout: fixed;
}

.online-tour table th,
.online-tour table td {
    vertical-align: middle !important;
}

/* Заголовки */
.online-tour table thead th {
    text-align: center !important;
    vertical-align: middle !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: 1.25 !important;
}

/* Первая колонка — дата */
.online-tour table tbody td:first-child {
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    font-weight: 400 !important;
}

/* Вторая колонка — тип номера и питание */
.online-tour table tbody td:nth-child(2) {
    text-align: center !important;
    vertical-align: middle !important;
    line-height: 1.35 !important;
}

/* Колонки с ценами */
.online-tour table thead th:nth-child(n+3),
.online-tour table tbody td:nth-child(n+3) {
    text-align: center !important;
    vertical-align: middle !important;
}

/* Цена как понятная ссылка */
.online-tour table tbody td:nth-child(n+3) a {
    color: #d63a1d !important;
    text-decoration: underline !important;
    text-underline-offset: 2px;
    text-decoration-thickness: 1px;
    font-weight: 400 !important;
    transition: color .15s ease, opacity .15s ease;
}

.online-tour table tbody td:nth-child(n+3) a:hover,
.online-tour table tbody td:nth-child(n+3) a:focus {
    color: #b52d14 !important;
    opacity: .9;
}

/* Если цена вдруг выводится не ссылкой, а просто текстом */
.online-tour table tbody td:nth-child(n+3) {
    color: #d63a1d;
}

/* Строки таблицы — чуть ровнее */
.online-tour table tbody tr td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
    line-height: 1.3 !important;
}

/* Блок статусов под датой */
.online-tour .ct-samo-date-statuses {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    margin: 5px auto 0 !important;
    padding: 0 !important;
    text-align: center !important;
    box-sizing: border-box !important;
}

/* Плашки статусов */
.online-tour .ct-samo-date-statuses > * {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    text-align: center !important;
}

/* Строка "Показать все варианты" */
.online-tour table tbody tr:last-child td {
    text-align: center !important;
}

/* /CHINATRAVEL SAMO TABLE POLISH V1 */



/* =========================================================
   CHINATRAVEL SAMO TABLE WIDTH FIX V2
   ========================================================= */

/*
 * ВАЖНО:
 * таблица SAMO имеет служебные ячейки,
 * поэтому table-layout:fixed использовать нельзя.
 */
.online-tour table {
    width: 100% !important;
    table-layout: auto !important;
}

/* Дата */
.online-tour table thead th:first-child,
.online-tour table tbody td:first-child {
    width: 115px !important;
    min-width: 105px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* Тип номера и питания */
.online-tour table thead th:nth-child(2),
.online-tour table tbody td:nth-child(2) {
    width: 220px !important;
    min-width: 190px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Цена */
.online-tour table thead th:nth-child(3),
.online-tour table thead th:nth-child(4),
.online-tour table thead th:nth-child(5),
.online-tour table tbody td:nth-child(3),
.online-tour table tbody td:nth-child(4),
.online-tour table tbody td:nth-child(5) {
    width: 115px !important;
    min-width: 95px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* Нормальная высота строк */
.online-tour table tbody td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/*
 * Если в конце SAMO-таблицы присутствует
 * полностью пустая служебная колонка —
 * не даём ей забирать полезную ширину.
 */
.online-tour table thead th:last-child:empty {
    width: 1px !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Ссылка-цена остаётся явно кликабельной */
.online-tour table tbody td:nth-child(3) a,
.online-tour table tbody td:nth-child(4) a,
.online-tour table tbody td:nth-child(5) a {
    color: #e23818 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-thickness: 1px !important;
    cursor: pointer !important;
}

.online-tour table tbody td:nth-child(3) a:hover,
.online-tour table tbody td:nth-child(4) a:hover,
.online-tour table tbody td:nth-child(5) a:hover {
    color: #ab1917 !important;
}


/* MOBILE */
@media (max-width: 767px) {

    .online-tour table thead th:first-child,
    .online-tour table tbody td:first-child {
        min-width: 92px !important;
        width: 92px !important;
    }

    .online-tour table thead th:nth-child(2),
    .online-tour table tbody td:nth-child(2) {
        min-width: 150px !important;
        width: 150px !important;
    }

    .online-tour table thead th:nth-child(3),
    .online-tour table thead th:nth-child(4),
    .online-tour table thead th:nth-child(5),
    .online-tour table tbody td:nth-child(3),
    .online-tour table tbody td:nth-child(4),
    .online-tour table tbody td:nth-child(5) {
        min-width: 85px !important;
        width: 85px !important;
    }
}

/* /CHINATRAVEL SAMO TABLE WIDTH FIX V2 */



/* =========================================================
   CHINATRAVEL SAMO PRICE COLOR V1
   ========================================================= */

.online-tour table tbody td:nth-child(3) a,
.online-tour table tbody td:nth-child(4) a,
.online-tour table tbody td:nth-child(5) a {
    color: #ab1917 !important;
    text-decoration: underline !important;
    text-underline-offset: 2px !important;
    text-decoration-thickness: 1px !important;
}

.online-tour table tbody td:nth-child(3) a:hover,
.online-tour table tbody td:nth-child(4) a:hover,
.online-tour table tbody td:nth-child(5) a:hover {
    color: #7f1211 !important;
}

/* /CHINATRAVEL SAMO PRICE COLOR V1 */



/* =========================================================
   CHINATRAVEL SAMO BOOKING HINT V1
   ========================================================= */

/* Подсказка непосредственно перед таблицей */
.online-tour .ct-samo-booking-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    width: 100%;
    margin: 8px 0 10px;
    padding: 8px 12px;

    background: #fffafa;
    border: 1px solid rgba(171, 25, 23, .16);

    color: #4a4a4a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;

    box-sizing: border-box;
}

.online-tour .ct-samo-booking-hint__arrow {
    flex: 0 0 auto;
    color: #ab1917;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.online-tour .ct-samo-booking-hint strong {
    color: #ab1917;
    font-weight: 600;
}


/* Цена остаётся фирменной бордовой ссылкой */
.online-tour table tbody td:nth-child(3) a,
.online-tour table tbody td:nth-child(4) a,
.online-tour table tbody td:nth-child(5) a {
    position: relative;

    color: #ab1917 !important;

    text-decoration: underline !important;
    text-decoration-thickness: 1px !important;
    text-underline-offset: 2px !important;

    cursor: pointer !important;
}


/* Лёгкий hover самой цены */
.online-tour table tbody td:nth-child(3) a:hover,
.online-tour table tbody td:nth-child(4) a:hover,
.online-tour table tbody td:nth-child(5) a:hover,
.online-tour table tbody td:nth-child(3) a:focus,
.online-tour table tbody td:nth-child(4) a:focus,
.online-tour table tbody td:nth-child(5) a:focus {
    color: #7f1211 !important;
}


/* Мини-подсказка над ценой */
.online-tour a[data-ct-booking-tip]:after {
    content: attr(data-ct-booking-tip);

    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);

    transform: translateX(-50%);

    min-width: 150px;
    padding: 7px 9px;

    background: #2d3135;
    color: #ffffff;

    font-size: 10px;
    font-weight: 400;
    line-height: 1.25;
    text-align: center;

    text-decoration: none !important;
    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;
    z-index: 100;

    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);

    transition:
        opacity .15s ease,
        visibility .15s ease;
}


/* Стрелочка tooltip */
.online-tour a[data-ct-booking-tip]:before {
    content: "";

    position: absolute;
    left: 50%;
    bottom: calc(100% + 3px);

    transform: translateX(-50%);

    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #2d3135;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;
    z-index: 101;

    transition:
        opacity .15s ease,
        visibility .15s ease;
}


.online-tour a[data-ct-booking-tip]:hover:after,
.online-tour a[data-ct-booking-tip]:hover:before,
.online-tour a[data-ct-booking-tip]:focus:after,
.online-tour a[data-ct-booking-tip]:focus:before {
    opacity: 1;
    visibility: visible;
}


/* Чуть подсвечиваем ячейку с активной ценой */
.online-tour table tbody td:has(
    > a[data-ct-booking-tip]:hover
) {
    background: #fffafa;
}


/* MOBILE */
@media (max-width: 767px) {

    .online-tour .ct-samo-booking-hint {
        justify-content: flex-start;

        margin: 7px 0 9px;
        padding: 8px 9px;

        font-size: 11px;
        text-align: left;
    }

    .online-tour a[data-ct-booking-tip]:after,
    .online-tour a[data-ct-booking-tip]:before {
        display: none;
    }
}

/* /CHINATRAVEL SAMO BOOKING HINT V1 */

/* SAMO room labels */
.ct-samo-date-promo {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}

.ct-samo-date-promo .ct-samo-date-badge--promo,
.ct-samo-date-promo .ct-samo-date-badge--roommate {
    display: inline-block;
    box-sizing: border-box;
    max-width: 100%;
    padding: 3px 7px;
    border: 1px solid #efb3b3;
    background: #fff0f0;
    color: #a51616;
    line-height: 1.35;
    white-space: normal;
    overflow-wrap: break-word;
}

/* SAMO roommate GDS palette */
.ct-samo-date-promo .ct-samo-date-badge--roommate.ct-samo-roommate--male {
    background: #e8f1ff;
    color: #1858a5;
    border: 1px solid #b8d2f3;
}
