/* ============================================
   ОБЩИЕ СБРОСЫ
   ============================================ */
* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* ============================================
   ПЕРВЫЙ ЭКРАН (на всю ширину)
   ============================================ */
.ff-landing-wrapper {
    min-height: 100vh;
    background: #fff;
    overflow: hidden;
}

.ff-first-screen {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: #fff;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* ФОТО СЛЕВА */
.ff-first-screen-left {
    flex: 1;
    position: relative;
    min-height: 100vh;
    width: 50%;
}

.ff-first-screen-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.ff-image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.08);
}

.ff-fairy-icon {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    padding: 24px;
    object-fit: contain;
}

/* ТЕКСТ СПРАВА */
.ff-first-screen-right {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 40px 60px;
    width: 50%;
}

.ff-first-screen-content {
    max-width: 580px;
    width: 100%;
}

.ff-first-screen-content .ff-discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f7cd47;
    padding: 4px 12px 4px 16px;
    border-radius: 4px 8px 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #222;
    position: relative;
}

.ff-first-screen-content .ff-discount-badge::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 3px;
    width: 21px;
    height: 19px;
    background: #f7cd47;
    transform: rotate(45deg);
    border-radius: 4px;
    z-index: 0;
}

.ff-first-screen-content .ff-discount-badge svg {
    position: relative;
    z-index: 1;
}

.ff-first-screen-content .ff-discount-badge span {
    position: relative;
    z-index: 1;
}

.ff-first-screen-content h1 {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.2;
    margin: 20px 0 8px;
    color: #222;
}

.ff-first-screen-content .ff-discount-number {
    color: #315c11;
}

.ff-first-screen-content .ff-subtitle {
    font-size: 13px;
    color: rgba(34,34,34,0.5);
    margin: 0 0 16px;
}

.ff-first-screen-content .ff-description {
    font-size: 16px;
    color: rgba(34,34,34,0.6);
    line-height: 1.6;
    margin: 0 0 30px;
}

/* ЧЕКБОКС СОГЛАСИЯ */
.ff-first-screen-content .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #555;
    margin: 16px 0 20px;
    cursor: pointer;
}

.ff-first-screen-content .checkbox input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    accent-color: #315c11;
}

.ff-first-screen-content .checkbox a {
    color: #315c11;
    text-decoration: underline;
}

.ff-first-screen-content .checkbox .required {
    color: #e74c3c;
}

.ff-btn-start {
    padding: 14px 48px;
    background: #315c11;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    width: 100%;
}

.ff-btn-start:hover {
    background: #264a0e;
    transform: translateY(-2px);
}

.ff-btn-start:active {
    transform: scale(0.97);
}

/* БОНУС (на первом экране) */
.ff-bonus-section {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.ff-bonus-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(34,34,34,0.4);
    margin-bottom: 8px;
}

.ff-bonus-block {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d1d1d1;
    border-radius: 8px;
    padding: 8px 16px 8px 8px;
    max-width: 200px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ff-bonus-block img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}

.ff-bonus-block div {
    font-size: 13px;
    font-weight: 500;
    color: #4a4a4a;
}

/* ============================================
   АНИМАЦИЯ СКРЫТИЯ ПЕРВОГО ЭКРАНА
   ============================================ */
.ff-first-screen.hide {
    animation: ffSlideOut 0.6s ease-in forwards;
}

@keyframes ffSlideOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.96); }
}

.ff-first-screen-left.hide-image {
    animation: ffSlideLeftOut 0.6s ease-in forwards;
}

@keyframes ffSlideLeftOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-60px); }
}

/* ============================================
   ФОРМА С ПРАВОЙ ПАНЕЛЬЮ
   ============================================ */
.ff-form-container {
    display: none;
    min-height: 100vh;
    background: #f8f8f8;
    padding: 0;
    margin: 0;
}

.ff-form-container.active {
    display: flex;
    animation: ffFadeInContainer 0.5s ease-out;
}

@keyframes ffFadeInContainer {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ЛЕВАЯ ЧАСТЬ (контейнер для формы + правой панели) */
.ff-form-left {
    flex: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
    background: #f8f8f8;
    min-height: 100vh;
    gap: 0;
}

/* НА ДЕСКТОПЕ: форма и правая панель в ряд */
.ff-form-left {
    flex-direction: row;
    align-items: stretch;
    gap: 0;
}

/* КАРТОЧКА ФОРМЫ */
.ff-form-card {
    max-width: 700px;
    width: 100%;
    background: #fff;
    border-radius: 24px 0 0 24px;
    box-shadow: 0 8px 60px rgba(0,0,0,0.1);
    padding: 32px 36px 28px;
    flex-shrink: 0;
}

.ff-form-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.ff-header-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ff-header-top img {
    width: 32px;
    height: 32px;
}

.ff-header-top span {
    font-size: 14px;
    font-weight: 500;
}

.ff-form-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #222;
    line-height: 1.3;
}

.ff-form-title .ff-discount-number {
    color: #315c11;
}

/* ============================================
   ПРАВАЯ ПАНЕЛЬ (десктоп — справа от формы)
   ============================================ */
.ff-form-right {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.ff-right-inner {
    background: #f7f7f7;
    border-radius: 0 24px 24px 0;
    padding: 30px 24px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    border: 1px solid #f0f0f0;
    border-left: none;
    min-height: 500px;
}

/* Блок скидки */
.ff-right-discount {
    width: 100%;
    background: #ffdd6f;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(255, 221, 111, 0.36);
}

.ff-right-discount-label {
    font-size: 14px;
    font-weight: 600;
    color: #2e2e54;
}

.ff-right-discount-value {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    color: #2e2e54;
}

.ff-right-discount-value svg {
    animation: ffArrowMove 1s infinite;
}

@keyframes ffArrowMove {
    0% { transform: translateY(0); }
    50% { transform: translateY(4px); }
    100% { transform: translateY(0); }
}

/* Картинка феи */
.ff-right-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.ff-right-image img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

/* Блок бонуса */
.ff-right-bonus {
    width: 100%;
}

.ff-right-bonus-block {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #d1d1d1;
    border-radius: 10px;
    padding: 10px 16px 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.ff-right-bonus-block img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 6px;
}

.ff-right-bonus-block div {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
}

/* ============================================
   WIZARD
   ============================================ */
.ff-wizard-wrapper {
    padding: 0;
}

/* ШАГИ */
.ff-step {
    display: none;
    animation: ffFadeIn 0.3s ease-out;
}

.ff-step.active {
    display: block;
}

@keyframes ffFadeIn {
    from { opacity: 0; transform: translateX(15px); }
    to { opacity: 1; transform: translateX(0); }
}

.ff-step.exiting {
    animation: ffFadeOut 0.3s ease-out;
}

@keyframes ffFadeOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-15px); }
}

.ff-step-subtitle {
    font-size: 16px;
    color: rgba(34,34,34,0.6);
    margin: 0 0 20px;
}

.ff-step-title {
    font-size: 22px;
    font-weight: 600;
    margin: 6px 0 10px;
    color: #222;
    text-align: center;
}

.ff-field {
    margin-bottom: 16px;
}

.ff-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    transition: border-color 0.3s;
    background: #fafafa;
    color: #222;
    outline: none;
    box-sizing: border-box;
}

.ff-input:focus {
    border-color: #315c11;
    background: #fff;
}

.ff-input.error {
    border-color: #e74c3c;
}

.ff-error {
    display: none;
    font-size: 13px;
    color: #e74c3c;
    margin-top: 4px;
}

.ff-error.show {
    display: block;
}

/* ДАТА */
.ff-date-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.ff-date-col {
    flex: 1;
}

.ff-date-col label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(34,34,34,0.6);
    margin-bottom: 4px;
}

.ff-date-col select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    background: #fafafa;
    outline: none;
    transition: border-color 0.3s;
    color: #222;
    appearance: auto;
    box-sizing: border-box;
}

.ff-date-col select:focus {
    border-color: #315c11;
    background: #fff;
}

/* ============================================
   ПРОГРЕСС-БАР + КНОПКИ ВНИЗУ
   ============================================ */
.ff-footer-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.ff-progress-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
}

.ff-progress-wrapper .ff-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #315c11;
    min-width: 36px;
    white-space: nowrap;
}

.ff-progress-wrapper .ff-progress-bar {
    flex: 1;
    height: 6px;
    background: #eaeaea;
    border-radius: 999px;
    overflow: hidden;
}

.ff-progress-wrapper .ff-progress-fill {
    height: 100%;
    background: #315c11;
    border-radius: 999px;
    transition: width 0.4s ease;
    width: 0%;
}

.ff-nav-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Кнопка "Назад" */
.ff-btn-prev {
    padding: 8px 20px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.ff-btn-prev:hover {
    background: #f5f5f5;
    color: #333;
}

.ff-btn-prev:active {
    transform: scale(0.97);
}

/* Кнопка "Далее" */
.ff-btn-next {
    padding: 8px 24px;
    background: #315c11;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.ff-btn-next:hover {
    background: #264a0e;
}

.ff-btn-next:active {
    transform: scale(0.97);
}

.ff-btn-next:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Кнопка "Отправить" */
.ff-btn-submit {
    padding: 8px 24px;
    background: #315c11;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.ff-btn-submit:hover {
    background: #264a0e;
}

.ff-btn-submit:active {
    transform: scale(0.97);
}

.ff-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Подсказка "или нажмите Enter" */
.ff-hint {
    font-size: 11px;
    color: #bbb;
    flex-basis: 100%;
    text-align: center;
    margin-top: 2px;
}

.ff-hint b {
    color: #888;
}

/* ============================================
   ФИНАЛ
   ============================================ */
.ff-success-icon {
    font-size: 56px;
    text-align: center;
    display: block;
    margin: 0 auto 8px;
}

.ff-success-text {
    font-size: 16px;
    color: rgba(34,34,34,0.7);
    text-align: center;
    margin: 6px 0;
}

.ff-success-text strong {
    color: #315c11;
}

.ff-gift-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #f0f7ec;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0 20px;
    font-size: 16px;
    font-weight: 600;
    color: #315c11;
    border: 2px dashed #44bc75;
}

.ff-gift-box span:first-child {
    font-size: 28px;
}

/* ============================================
   ФУТЕР ФОРМЫ
   ============================================ */
.ff-form-footer {
    display: flex;
    flex-direction: column;
    padding-top: 16px;
    margin-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ff-form-footer a {
    font-size: 16px;
    color: #315c11;
    text-decoration: none;
    font-weight: 500;
}

.ff-form-footer span {
    font-size: 11px;
    color: rgba(34,34,34,0.5);
}

/* ============================================
   СТРАНИЦА БЛАГОДАРНОСТИ
   ============================================ */
.ff-thank-you-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 20px;
}

.ff-thank-you-content {
    max-width: 600px;
    text-align: center;
    padding: 40px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.ff-thank-you-content .ff-success-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.ff-thank-you-content h1 {
    color: #333;
    margin-bottom: 15px;
}

.ff-thank-you-content p {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ============================================
   АДАПТИВ — МОБИЛЬНАЯ ВЕРСИЯ (ФОРМА СВЕРХУ)
   ============================================ */

/* Планшеты и маленькие экраны */
@media (max-width: 900px) {
    .ff-first-screen {
        flex-direction: column;
    }

    .ff-first-screen-left {
        width: 100%;
        min-height: 300px;
        max-height: 400px;
    }

    .ff-first-screen-image {
        height: 100%;
        min-height: 300px;
    }

    .ff-first-screen-right {
        width: 100%;
        padding: 30px 24px 50px;
    }

    .ff-first-screen-content h1 {
        font-size: 28px;
    }

    .ff-fairy-icon {
        width: 80px;
        height: 80px;
        padding: 16px;
    }

    /* ФОРМА СВЕРХУ СТРАНИЦЫ */
    .ff-form-container.active {
        flex-direction: column;
        padding: 0;
        margin: 0;
        min-height: 100vh;
        align-items: stretch;
        justify-content: flex-start;
    }

    .ff-form-left {
        flex-direction: column !important;
        padding: 16px 12px 20px !important;
        min-height: auto !important;
        background: #f8f8f8;
        width: 100%;
        justify-content: flex-start;
        align-items: stretch;
    }

    .ff-form-card {
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 20px 16px 18px !important;
        box-shadow: 0 4px 30px rgba(0,0,0,0.08);
        margin-top: 0;
    }

    .ff-form-title {
        font-size: 18px !important;
    }

    /* ПРАВАЯ ПАНЕЛЬ — ПОД ФОРМОЙ */
    .ff-form-right {
        width: 100% !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 0 16px 16px !important;
        overflow: hidden;
        margin-bottom: 0;
    }

    .ff-right-inner {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 16px 18px !important;
        min-height: auto !important;
        gap: 12px !important;
        border-radius: 0 0 16px 16px !important;
        border: 1px solid #f0f0f0 !important;
        border-top: none !important;
        background: #f7f7f7 !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    }

    .ff-right-discount {
        flex: 1 1 160px;
        min-width: 120px;
        padding: 10px 14px;
        border-radius: 10px;
        margin: 0;
    }

    .ff-right-discount-label {
        font-size: 12px;
    }

    .ff-right-discount-value {
        font-size: 14px;
    }

    .ff-right-discount-value svg {
        width: 12px;
        height: 12px;
    }

    .ff-right-image {
        flex: 0 0 auto;
        padding: 0 4px;
    }

    .ff-right-image img {
        max-height: 60px;
        width: auto;
    }

    .ff-right-bonus {
        flex: 1 1 130px;
        min-width: 110px;
    }

    .ff-right-bonus-block {
        padding: 8px 14px 8px 10px;
        border-radius: 10px;
    }

    .ff-right-bonus-block img {
        width: 30px;
        height: 30px;
    }

    .ff-right-bonus-block div {
        font-size: 12px;
    }

    .ff-date-group {
        flex-direction: column;
        gap: 8px;
    }

    .ff-footer-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .ff-progress-wrapper {
        min-width: auto;
        width: 100%;
    }

    .ff-nav-buttons {
        justify-content: center;
        width: 100%;
    }

    .ff-btn-prev,
    .ff-btn-next,
    .ff-btn-submit {
        padding: 10px 20px;
        font-size: 14px;
        flex: 1;
        text-align: center;
    }

    .ff-hint {
        text-align: center;
    }
}

/* Телефоны */
@media (max-width: 500px) {
    .ff-first-screen-right {
        padding: 20px 16px 40px;
    }

    .ff-first-screen-content h1 {
        font-size: 22px;
    }

    .ff-first-screen-content .ff-description {
        font-size: 14px;
    }

    .ff-btn-start {
        padding: 14px;
        font-size: 15px;
    }

    .ff-form-container.active {
        padding: 0;
    }

    .ff-form-left {
        padding: 10px 8px 16px !important;
    }

    .ff-form-card {
        padding: 16px 12px 14px !important;
        border-radius: 14px 14px 0 0 !important;
    }

    .ff-form-title {
        font-size: 16px !important;
    }

    .ff-right-inner {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 14px !important;
        gap: 10px !important;
        border-radius: 0 0 14px 14px !important;
    }

    .ff-right-discount {
        width: 100% !important;
        flex: none;
        padding: 10px 14px;
        justify-content: space-between;
    }

    .ff-right-discount-label {
        font-size: 12px;
    }

    .ff-right-discount-value {
        font-size: 14px;
    }

    .ff-right-image {
        display: none !important;
    }

    .ff-right-bonus {
        width: 100% !important;
        flex: none;
    }

    .ff-right-bonus-block {
        padding: 8px 12px 8px 8px;
        justify-content: center;
    }

    .ff-right-bonus-block img {
        width: 26px;
        height: 26px;
    }

    .ff-right-bonus-block div {
        font-size: 12px;
    }

    .ff-input,
    .ff-date-col select {
        padding: 12px 14px;
        font-size: 15px;
    }

    .ff-btn-next,
    .ff-btn-submit,
    .ff-btn-prev {
        padding: 12px 16px;
        font-size: 14px;
    }

    .ff-bonus-block {
        max-width: 100%;
    }
}

/* Очень маленькие экраны */
@media (max-width: 380px) {
    .ff-form-container.active {
        padding: 0;
    }

    .ff-form-left {
        padding: 6px 4px 12px !important;
    }

    .ff-form-card {
        padding: 12px 10px 12px !important;
        border-radius: 12px 12px 0 0 !important;
    }

    .ff-form-title {
        font-size: 15px !important;
    }

    .ff-right-inner {
        padding: 10px !important;
        gap: 8px !important;
        border-radius: 0 0 12px 12px !important;
    }

    .ff-right-discount {
        padding: 8px 12px;
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }

    .ff-right-discount-label {
        font-size: 11px;
    }

    .ff-right-discount-value {
        font-size: 13px;
    }

    .ff-right-bonus-block {
        padding: 6px 10px 6px 8px;
    }

    .ff-right-bonus-block img {
        width: 22px;
        height: 22px;
    }

    .ff-right-bonus-block div {
        font-size: 11px;
    }
}

/* Согласие на обработку данных */
.ff-btn-start.is-disabled { opacity: .5; cursor: not-allowed; }
.ff-consent-error { display: none; color: #c0392b; font-size: 13px; margin: 8px 0; }
.ff-consent-error.show { display: block; }
