/*
 * Конверсионные блоки: CTA-баннер, поп-ап, мобильная липкая панель, состояние успеха форм.
 * Разметка: resources/views/common/_cta_band.blade.php, _popup.blade.php, _sticky_cta.blade.php
 * Тексты: config/offers.php
 *
 * Базовый ресет проекта (public/css/redesign/header.css) обнуляет фон и рамки у всех
 * элементов, поэтому фон/границы задаются здесь явно.
 */

/* ─── CTA-баннер ─────────────────────────────────────────────────────────── */

.lf-cta-block {
    padding: 90px 30px;
    background: #1D1918;
}

.lf-cta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    gap: 60px;
    align-items: start;
    padding: 50px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    background: linear-gradient(120deg, #262120 0%, #1F1B1A 60%, #1B2A2D 100%);
}

.lf-cta__eyebrow {
    color: #0CB4CE;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.lf-cta__title {
    color: #FFF;
    font-size: 40px;
    font-weight: 500;
    line-height: 110%;
    letter-spacing: -1px;
}

.lf-cta__text {
    margin-top: 18px;
    color: #B5B0AE;
    font-size: 18px;
    line-height: 150%;
}

.lf-cta__list {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
}

.lf-cta__list li {
    position: relative;
    padding-left: 30px;
    color: #E6E3E1;
    font-size: 16px;
    line-height: 140%;
}

.lf-cta__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(12, 180, 206, 0.18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%230CB4CE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}

/* ─── Форма (общая для баннера и поп-апа) ───────────────────────────────── */

.lf-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lf-cta__form {
    padding: 30px;
    border-radius: 16px;
    background: #FFF;
}

.lf-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lf-form__label {
    color: #7A7472;
    font-size: 13px;
    font-weight: 500;
}

.lf-form__label em {
    color: #0CB4CE;
    font-style: normal;
}

.lf-form input[type="text"],
.lf-form input[type="tel"] {
    height: 56px;
    padding: 0 16px;
    border: 1px solid #D4D4D4;
    border-radius: 8px;
    background: #FFF;
    color: #332F2E;
    font-size: 17px;
    transition: border-color .15s ease;
}

.lf-form input::placeholder {
    color: #B5B5B5;
}

.lf-form input:focus {
    border-color: #0CB4CE;
}

.lf-form__btn {
    height: 58px;
    margin-top: 6px;
    padding: 0 24px;
    border-radius: 10px;
    background: #0CB4CE;
    color: #FFF;
    font-size: 17px;
    font-weight: 600;
    text-transform: uppercase;
}

.lf-form__btn:hover {
    background: #20C8E2;
}

.lf-form__btn.is-loading,
.lf-form__btn.disabled {
    cursor: default;
    opacity: .85;
}

.lf-form__btn.is-loading:hover {
    background: #0CB4CE;
}

.lf-form__note {
    color: #5F5A58;
    font-size: 14px;
    line-height: 135%;
}

.lf-form__consent {
    color: #A8A3A1;
    font-size: 12px;
    line-height: 130%;
}

/* Состояние после успешной отправки (подставляется из main.js) */
.lf-form__success {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    padding: 6px 0;
}

.lf-form__success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(12, 180, 206, 0.14);
    color: #0CB4CE;
    font-size: 22px;
}

.lf-form__success-title {
    color: #332F2E;
    font-size: 22px;
    font-weight: 600;
}

.lf-form__success-text {
    color: #5F5A58;
    font-size: 15px;
    line-height: 140%;
}

.lf-form__success-text a {
    color: #0CB4CE;
    font-weight: 600;
    white-space: nowrap;
}

.lf-popup .lf-form__success-title {
    color: #332F2E;
}

/* Микрокопия в нижней форме страницы */
.home-form-card-note {
    color: #5F5A58 !important;
    font-size: 13px !important;
    line-height: 135% !important;
    text-align: center;
}

/* ─── Поп-ап ─────────────────────────────────────────────────────────────── */

.lf-popup {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lf-popup[hidden] {
    display: none;
}

.lf-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 8, 8, 0.72);
    opacity: 0;
    transition: opacity .25s ease;
}

.lf-popup__card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 40px;
    border-radius: 20px;
    background: #FFF;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .25s ease, transform .25s ease;
}

.lf-popup.is-visible .lf-popup__backdrop {
    opacity: 1;
}

.lf-popup.is-visible .lf-popup__card {
    opacity: 1;
    transform: translateY(0);
}

.lf-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #F1EFEE;
    color: #6E6866;
}

.lf-popup__close:hover {
    background: #E4E1E0;
    color: #332F2E;
}

.lf-popup__title {
    padding-right: 40px;
    color: #332F2E;
    font-size: 28px;
    font-weight: 600;
    line-height: 115%;
    letter-spacing: -0.5px;
}

.lf-popup__text {
    margin-top: 14px;
    color: #5F5A58;
    font-size: 16px;
    line-height: 145%;
}

.lf-popup__list {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    list-style: none;
}

.lf-popup__list li {
    position: relative;
    padding-left: 26px;
    color: #332F2E;
    font-size: 15px;
    line-height: 135%;
}

.lf-popup__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(12, 180, 206, 0.16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8' fill='none'%3E%3Cpath d='M1 4L3.5 6.5L9 1' stroke='%230CB4CE' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center no-repeat;
}

.lf-popup__form {
    margin-top: 24px;
}

body.lf-popup-open {
    overflow: hidden;
}

/* ─── Липкая мобильная панель ────────────────────────────────────────────── */

.lf-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(29, 25, 24, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    transform: translateY(110%);
    transition: transform .25s ease;
}

.lf-sticky.is-visible {
    transform: translateY(0);
}

.lf-sticky__call {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    color: #0CB4CE;
}

.lf-sticky__text {
    flex: 1 1 auto;
    min-width: 0;
    color: #E6E3E1;
    font-size: 13px;
    line-height: 120%;
}

.lf-sticky__btn {
    flex: 0 0 auto;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    background: #0CB4CE;
    color: #FFF;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ─── Адаптив ────────────────────────────────────────────────────────────── */

@media (min-width: 990px) and (max-width: 1439px) {
    .lf-cta {
        gap: 40px;
        padding: 40px;
    }

    .lf-cta__title {
        font-size: 34px;
    }
}

@media (max-width: 989px) {
    .lf-cta-block {
        padding: 50px 15px;
    }

    .lf-cta {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
        padding: 28px 20px;
        border-radius: 16px;
    }

    .lf-cta__eyebrow {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .lf-cta__title {
        font-size: 26px;
        letter-spacing: -0.5px;
    }

    .lf-cta__text {
        margin-top: 12px;
        font-size: 16px;
    }

    .lf-cta__list {
        margin-top: 20px;
    }

    .lf-cta__list li {
        font-size: 15px;
    }

    .lf-cta__form {
        padding: 20px 16px;
    }

    .lf-form input[type="text"],
    .lf-form input[type="tel"] {
        height: 52px;
        font-size: 16px;
    }

    .lf-form__btn {
        height: 52px;
        font-size: 15px;
    }

    .lf-popup__card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .lf-popup__title {
        font-size: 22px;
    }

    .lf-popup__text {
        font-size: 15px;
    }

    /* Липкая панель — только на мобильных: на десктопе телефон есть в шапке */
    .lf-sticky {
        display: flex;
    }

    body.lf-has-sticky {
        padding-bottom: 64px;
    }

    /* Плашка телеграма (footer.css) фиксирована у нижнего края — поднимаем её над панелью */
    body.lf-has-sticky .telegram-tag {
        bottom: 118px;
        transition: right .3s ease-in-out, bottom .25s ease;
    }
}
