/* ==========================================================
   Форма "Хочу на відпочинок" (otpusk) — сучасний вигляд
   Тільки стилі, функціонал форми не змінюється
   ========================================================== */

/* Затемнення фону */
html body .fancybox-overlay {
    background: rgba(16, 16, 48, .55) !important;
}

/* Вікно */
html body .fancybox-wrap .fancybox-skin {
    padding: 0 !important;
    background: #fff !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(16, 16, 48, .25) !important;
}
html body .fancybox-wrap .fancybox-outer,
html body .fancybox-wrap .fancybox-inner {
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
}

/* Хрестик закриття */
html body .fancybox-wrap .fancybox-close {
    top: 22px !important;
    right: 22px !important;
    width: 36px !important;
    height: 36px !important;
    background: none !important;
    border-radius: 50%;
    transition: background .2s ease;
}
html body .fancybox-wrap .fancybox-close:hover {
    background: #f0f0f7 !important;
}
html body .fancybox-wrap .fancybox-close::before,
html body .fancybox-wrap .fancybox-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    margin: -1px 0 0 -9px;
    background: #202060;
    border-radius: 2px;
}
html body .fancybox-wrap .fancybox-close::before { transform: rotate(45deg); }
html body .fancybox-wrap .fancybox-close::after  { transform: rotate(-45deg); }

/* Контейнер форми */
html body .os-order-form-wrap {
    width: 100% !important;
    padding: 32px !important;
    border: 0 !important;
    border-radius: 20px;
    background: #fff !important;
    color: #202060;
}
html body .os-order-form-wrap,
html body .os-order-form-wrap * {
    font-family: "Roboto", Arial, sans-serif !important;
}

/* Заголовок */
html body .os-order-form-wrap .os-order-header-title {
    grid-column: 1 / -1;
    height: auto;
    margin: 0 48px 8px 0 !important;
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.2;
    color: #202060 !important;
}

/* ---------- Верхня частина ----------
   Колонки: [Куди / Тривалість] [підпис] [список] ["та"] [список]
   Рядок 1: Куди?      | Дорослі та діти [1] та [0]
   Рядок 2: Тривалість | Вік дітей [ ] [ ] [ ]
*/
html body .os-order-form-wrap .os-order-top-part {
    display: grid;
    grid-template-columns: calc(50% - 8px) auto minmax(0, 1fr) auto minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 16px;
}
html body .os-order-form-wrap .os-order-table,
html body .os-order-form-wrap .os-order-right-col,
html body .os-order-form-wrap .os-order-input-people,
html body .os-order-form-wrap .os-order-input-people > span {
    display: contents !important;
}
html body .os-order-form-wrap .os-order-left-col {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
}
html body .os-order-form-wrap .os-order-input-city {
    margin-top: 12px;
}
html body .os-order-form-wrap .os-order-input-duration {
    grid-column: 1 / 2;
    order: 1;
    width: auto !important;
}

/* Випадаючі списки */
html body .os-order-form-wrap .os-order-select-wrapper {
    display: block;
    width: 100% !important;
    height: 48px !important;
    border: 1px solid #dfe1e8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
html body .os-order-form-wrap .os-order-select-wrapper:hover {
    border-color: #b9bccb !important;
}
html body .os-order-form-wrap .os-order-select-wrapper:focus-within {
    border-color: #202060 !important;
    box-shadow: 0 0 0 3px rgba(32, 32, 96, .12);
}
html body .os-order-form-wrap select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100% !important;
    height: 46px !important;
    line-height: 46px !important;
    padding: 0 40px 0 14px !important;
    font-size: 16px !important;
    color: #202060 !important;
    background: transparent !important;
}

/* Стрілка-шеврон у списках */
html body .os-order-form-wrap .os-order-select-wrapper::after {
    content: '' !important;
    top: 50% !important;
    right: 16px !important;
    width: 8px !important;
    height: 8px !important;
    padding: 0 !important;
    margin-top: -6px;
    border-right: 2px solid #202060;
    border-bottom: 2px solid #202060;
    background: none !important;
    transform: rotate(45deg);
}

/* Дорослі та діти */
html body .os-order-form-wrap .os-order-first-title,
html body .os-order-form-wrap .os-order-and-title,
html body .os-order-form-wrap .os-order-second-title {
    position: static;
    top: 0 !important;
    width: auto;
    margin: 0;
    font-size: 14px !important;
    line-height: 1.2;
    color: #6b6f80 !important;
}
html body .os-order-form-wrap .os-order-first-title,
html body .os-order-form-wrap .os-order-and-title {
    align-self: center;
}
html body .os-order-form-wrap .os-order-first-title {
    margin-left: 8px !important;
}
html body .os-order-form-wrap .os-order-right-col select {
    padding: 0 28px 0 14px !important;
}
html body .os-order-form-wrap .os-order-right-col .os-order-select-wrapper::after {
    right: 12px !important;
}

/* Вік дітей: праворуч від "Тривалості", поля горизонтально */
html body .os-order-form-wrap .os-order-input-people > span > div {
    grid-column: 2 / -1;
    order: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding-left: 8px;
}
html body .os-order-form-wrap .os-order-second-title {
    flex: 0 0 auto;
    max-width: 50px;
}
html body .os-order-form-wrap .os-order-input-people > span > div > span {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
html body .os-order-form-wrap .os-order-input-people [class*="os-wr"] {
    flex: 1 1 0;
    min-width: 64px;
    width: auto !important;
    margin: 0 !important;
}

/* Ім'я / Телефон / E-mail */
html body .os-order-form-wrap .os-order-user-contacts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    width: auto;
    height: auto;
    margin-top: 16px !important;
}
html body .os-order-form-wrap .os-order-input-email {
    grid-column: 1 / -1;
}
html body .os-order-form-wrap .os-order-user-contacts > div,
html body .os-order-form-wrap .os-order-user-contacts span,
html body .os-order-form-wrap .os-order-input-comment span {
    display: block;
    width: auto;
    height: auto;
}

/* Поля вводу */
html body .os-order-form-wrap .os-order-user-contacts input,
html body .os-order-form-wrap textarea {
    display: block;
    width: 100% !important;
    height: 48px;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #dfe1e8 !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 16px !important;
    color: #202060 !important;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}
html body .os-order-form-wrap .os-order-user-contacts input:hover,
html body .os-order-form-wrap textarea:hover {
    border-color: #b9bccb !important;
}
html body .os-order-form-wrap .os-order-user-contacts input:focus,
html body .os-order-form-wrap textarea:focus {
    border-color: #202060 !important;
    box-shadow: 0 0 0 3px rgba(32, 32, 96, .12) !important;
}
html body .os-order-form-wrap input::placeholder,
html body .os-order-form-wrap textarea::placeholder {
    color: #9a9db0;
}
html body .os-order-form-wrap textarea {
    height: 110px;
    padding: 12px 14px !important;
    resize: vertical;
}

/* Побажання та найближчий офіс */
html body .os-order-form-wrap .os-order-input-comment,
html body .os-order-form-wrap .os-order-input-office {
    width: auto;
    margin-top: 16px !important;
}

/* Текст згоди */
html body .os-order-form-wrap .os-order-desc {
    margin: 14px 0 20px !important;
    font-size: 13px !important;
    line-height: 1.4;
    color: #8a8da0;
}

/* Кнопка "Відправити" */
html body .os-order-form-wrap .os-order-form-submit {
    width: auto;
    height: auto;
}
html body .os-order-form-wrap button.os-order-form-submit_button {
    display: block;
    width: 100% !important;
    height: 54px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #202060 !important;
    background-image: none !important;
    box-shadow: 0 8px 20px rgba(32, 32, 96, .25);
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #fff !important;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
}
html body .os-order-form-wrap button.os-order-form-submit_button:hover {
    background: #2d2d85 !important;
}
html body .os-order-form-wrap button.os-order-form-submit_button:active {
    transform: translateY(1px);
}

/* ---------- Десктоп: вікно 640px по центру ---------- */
@media (min-width: 701px) {
    html body .fancybox-wrap {
        width: 640px !important;
        left: calc(50% - 320px) !important;
    }
}

/* ---------- Планшет / мобільний ---------- */
@media (max-width: 700px) {
    html body .fancybox-wrap {
        width: calc(100% - 24px) !important;
        left: 12px !important;
        top: 12px !important;
        margin-bottom: 12px;
    }
}

/* ---------- Мобільний: компактна форма ----------
   Порядок: Куди? → Дорослі та діти → Вік дітей → Тривалість
*/
@media (max-width: 576px) {
    html body .os-order-form-wrap {
        padding: 20px 16px !important;
    }
    html body .os-order-form-wrap .os-order-header-title {
        margin-bottom: 4px !important;
        font-size: 20px !important;
    }
    html body .fancybox-wrap .fancybox-close {
        top: 12px !important;
        right: 10px !important;
    }

    /* Колонки: [підпис] [список] ["та"] [список], усе інше на всю ширину */
    html body .os-order-form-wrap .os-order-top-part {
        grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
        row-gap: 10px;
    }
    html body .os-order-form-wrap .os-order-left-col,
    html body .os-order-form-wrap .os-order-input-duration,
    html body .os-order-form-wrap .os-order-input-people > span > div {
        grid-column: 1 / -1;
    }
    html body .os-order-form-wrap .os-order-first-title,
    html body .os-order-form-wrap .os-order-input-people > span > div {
        margin-left: 0 !important;
        padding-left: 0;
    }

    /* Вік дітей одразу під "Дорослі та діти", "Тривалість" після нього */
    html body .os-order-form-wrap .os-order-input-people > span > div {
        order: 1;
    }
    html body .os-order-form-wrap .os-order-input-duration {
        order: 2;
    }

    /* Нижчі поля і менші відступи */
    html body .os-order-form-wrap .os-order-select-wrapper {
        height: 44px !important;
    }
    html body .os-order-form-wrap select {
        height: 42px !important;
        line-height: 42px !important;
    }
    html body .os-order-form-wrap .os-order-user-contacts input {
        height: 44px;
    }
    html body .os-order-form-wrap textarea {
        height: 72px;
    }

    /* Ім'я і Телефон в один рядок, E-mail на всю ширину */
    html body .os-order-form-wrap .os-order-user-contacts {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        margin-top: 10px !important;
    }
    html body .os-order-form-wrap .os-order-input-comment,
    html body .os-order-form-wrap .os-order-input-office {
        margin-top: 10px !important;
    }
    html body .os-order-form-wrap .os-order-desc {
        margin: 10px 0 14px !important;
        font-size: 12px !important;
    }
    html body .os-order-form-wrap button.os-order-form-submit_button {
        height: 48px !important;
        font-size: 16px !important;
    }
}