/* ============================================================
   Контакты в шапке + быстрая заявка. Модуль v2 (2026-08-04)
   Подключается одной строкой: assets/css/contacts.css
   ============================================================ */

/* ---------- Кнопки контактов в шапке ---------- */
.hdr-contact a {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 18px !important;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: transform .2s ease, box-shadow .2s ease;
}

.hdr-contact a svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: currentColor;
}

.hdr-contact--tg a {
    background: #229ED9;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(34, 158, 217, .35);
}

.hdr-contact--mail a {
    background: #fff;
    color: #0c5adb !important;
    border: 2px solid rgba(12, 90, 219, .25);
}

.hdr-contact a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
}

/* Контейнер шапки ограничен 1250px на любом мониторе, поэтому меню + контакты +
   язык + Order помещаются в строку только с иконками без подписей. Подпись
   остаётся в разметке для скринридеров (aria-label) и мобильного меню. */
.hdr-contact .hdr-contact__label { display: none; }
.hdr-contact a { padding: 11px !important; }
.navbar .attr-right .attr-nav li { margin-left: 10px !important; }
.hdr-contact a svg { width: 24px; height: 24px; flex: 0 0 24px; }

/* Шапка темы держалась на float: как только меню становилось длиннее (de, ar,
   ja, fr), правый блок сваливался под него — так было и до контактов.
   В разметке контейнер уже размечен как d-flex, тема лишь перебивала его
   на display:block. Возвращаем флекс — строка перестаёт рваться. */
@media (min-width: 1024px) {
    nav.navbar.validnavs > .container {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    nav.navbar.validnavs > .container > .navbar-header { flex: 0 0 auto; }
    nav.navbar.validnavs > .container > .navbar-collapse.collapse {
        float: none !important;
        flex: 0 1 auto;
        display: flex !important;
        justify-content: flex-end;
        min-width: 0;
    }
    nav.navbar.validnavs > .container > .attr-right { float: none !important; flex: 0 0 auto; }
    /* .navbar-nav у бутстрапа — колонка, поэтому направление задаём явно */
    nav.navbar.validnavs .navbar-nav {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }
    nav.navbar.validnavs ul.nav > li > a { white-space: nowrap; }
}

/* Длинные меню (ja, ar, de, fr) не влезали рядом с контактами — сжимаем отступы
   пунктов ровно настолько, чтобы строка держалась во всех 11 локалях. */
@media (min-width: 1024px) and (max-width: 1499px) {
    nav.navbar.validnavs ul.nav > li > a { padding: 30px 7px !important; font-size: 15px !important; }
}

@media (min-width: 1500px) {
    nav.navbar.validnavs ul.nav > li > a { padding: 30px 12px !important; font-size: 17px !important; }
}

/* 1024–1199px: контейнер узкий (960px), и правый блок сваливался под меню
   ещё до появления контактов. Ужимаем отступы, чтобы шапка держала строку. */
@media (min-width: 1024px) and (max-width: 1199px) {
    nav.navbar.validnavs ul.nav > li > a { padding: 30px 6px !important; font-size: 15px !important; }
    .navbar .attr-right .attr-nav li { margin-left: 6px !important; }
    .hdr-contact a { padding: 9px !important; }
    .hdr-contact a svg { width: 20px; height: 20px; flex: 0 0 20px; }
    .navbar .attr-nav .btn-primary-white { width: 62px; font-size: 15px; }
    .navbar .attr-right .attr-nav li.button a { padding: 11px 22px !important; }
    nav.navbar.validnavs .navbar-brand > img { max-width: 150px; }
}

/* ---------- Мобильная версия ----------
   Базовая тема прячет .attr-right при <=550px. Возвращаем контакты,
   но только их: язык и «Order» на мобиле показывает своя кнопка. */
@media (max-width: 550px) {
    .attr-right { display: block !important; }
    .navbar .attr-right .attr-nav li.dropdown,
    .navbar .attr-right .attr-nav li.button { display: none !important; }
    .navbar .attr-right .attr-nav li.hdr-contact { display: inline-block !important; margin-left: 6px !important; }
    .navbar .attr-right .attr-nav li.hdr-contact a { padding: 9px !important; }
    /* Логотип на мобиле спозиционирован по центру абсолютно — не даём
       иконкам заходить на него */
    nav.navbar.validnavs .navbar-brand > img { max-width: 150px; }
    nav.navbar.validnavs a.navbar-brand { left: 46% !important; }
}

@media (max-width: 1023px) {
    .navbar .attr-right .attr-nav li.hdr-contact a { padding-top: 10px !important; padding-bottom: 10px !important; }
    /* На мобиле шапка белая, а языковые версии отдают белый логотип —
       он сливался с фоном. Перекрашиваем в тёмный, как на английской версии. */
    nav.navbar.validnavs .navbar-brand img[src*="logo-light"] { filter: brightness(0); }
}

/* Логотип и кнопка Order на мобиле налезали друг на друга — разводим */
@media only screen and (max-width: 768px) {
    .order-button { margin-left: 0 !important; }
}

@media only screen and (max-width: 550px) {
    .order-button { display: none !important; }
    nav.navbar.validnavs .navbar-toggle { margin: 0 8px !important; }
}

/* ---------- Быстрая заявка на первом экране ---------- */
.quick-lead {
    margin-top: 30px;
    max-width: 560px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 16px;
    padding: 22px 24px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.quick-lead__title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 14px;
}

.quick-lead__row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-lead input {
    flex: 1 1 200px;
    min-width: 0;
    height: 52px;
    padding: 0 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    color: #04000b;
    background: #fff;
}

.quick-lead input::placeholder { color: #8a8a8a; }

.quick-lead input:focus {
    outline: 3px solid rgba(255, 255, 255, .55);
    outline-offset: 1px;
}

.quick-lead button {
    flex: 1 1 100%;
    height: 52px;
    padding: 0 30px;
    border: none;
    border-radius: 10px;
    background: #ff1e7e;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.quick-lead button:hover { background: #e0176d; transform: translateY(-2px); }
.quick-lead button:disabled { opacity: .65; cursor: wait; transform: none; }

.quick-lead__note {
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
    line-height: 1.5;
    margin: 12px 0 0;
}

.quick-lead__msg {
    margin: 12px 0 0;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
}

.quick-lead__msg.is-error { color: #ffd9e6; }

@media (max-width: 767px) {
    .quick-lead {
        margin-left: auto;
        margin-right: auto;
        padding: 18px 16px;
        text-align: left;
    }
    .quick-lead button { flex: 1 1 100%; }
}

/* ---------- Плавающая кнопка «Написать» (замена мёртвого WhatsApp) ---------- */
.tg-float {
    position: fixed;
    right: 20px;
    bottom: 100px;
    z-index: 999;
}

.tg-float a {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #229ED9;
    color: #fff;
    padding: 12px 18px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(34, 158, 217, .4);
    transition: transform .2s ease, background .2s ease;
}

.tg-float a:hover { background: #1b8ec2; transform: translateY(-2px); }
.tg-float svg { width: 22px; height: 22px; fill: currentColor; }

/* Пока на экране форма быстрой заявки, плавающая кнопка не перекрывает поля */
.tg-float.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
}

@media (max-width: 767px) {
    .tg-float { right: 14px; bottom: 86px; }
    .tg-float a { padding: 12px 14px; }
    .tg-float .tg-float__label { display: none; }
}
