/* Стили попапа — 1 в 1 из popup-standalone.html */
/* CSS переменные */
:root {
    --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --heading-color: #111;
    --border: #E5E7EB;
    --brand-color: #EDAD35;
}

/* Базовые стили */
* { box-sizing: border-box; }

body.popup-open { overflow: hidden; }

/* Overlay */
.popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(6px);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s step-end;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-overlay.show {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.28s ease, visibility 0.28s step-start;
}

.popup-overlay.closing { opacity: 0; }

/* Попап: Простая форма */
.popup-sheet {
    background: #fff;
    color: #111;
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 16px 16px 20px;
    position: relative;
    opacity: 0;
    transform: scale(0.96);
    transition: transform 0.28s ease, opacity 0.28s ease;
}

.popup-overlay.show .popup-sheet { opacity: 1; transform: scale(1); }
.popup-overlay.closing .popup-sheet { opacity: 0; transform: scale(0.98); }

.popup-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    background: #F3F4F6;
    cursor: pointer;
    font-size: 16px;
    line-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-sheet h2 {
    margin: 0 0 10px;
    font: 700 20px/1.2 var(--body-font);
    color: var(--heading-color);
}

.popup-subtitle { margin: 0 0 14px; color: #6B7280; font: 14px/1.5 var(--body-font); }

.popup-field {
    width: 100%;
    max-width: 100%;
    display: block;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 10px;
    font: 16px/1 var(--body-font);
    background: #fff;
}

/* Текстовое поле описания — как инпуты и на всю ширину */
.popup-form textarea,
.popup-form .textarea,
.quiz-content-block .form .textarea {
    width: 100%;
    max-width: 100%;
    display: block;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid var(--border, #E5E7EB);
    border-radius: 10px;
    font: 16px/1.4 var(--body-font);
    background: #fff;
    min-height: 120px;
    resize: vertical;
}

.popup-cta {
    display: inline-block;
    width: 100%;
    padding: 25px;
    margin-top: 8px;
    border-radius: 10px;
    color: #301805;
    background: linear-gradient(90deg, #ffdd44 0%, #ff8d08 100%);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.03rem !important;
    text-transform: uppercase !important;
}

/* псевдо-элементы не используются, фон задан напрямую */

.popup-whatsapp { display:flex; align-items:center; justify-content:center; gap:8px; margin:15px auto 0; padding:8px 16px; color:#25D366; text-decoration:none; font-size:16px; font-weight:500; border-radius:20px; transition:all .3s ease; background:transparent; width:fit-content; }
.popup-whatsapp svg { width:16px; height:16px; flex-shrink:0; }

.popup-policy { margin: 10px 0 0; font: 12px/1.4 var(--body-font); color: #8a919b; text-align: center; }
.popup-policy a { color: #000000; text-decoration: none; }

/* Мобильная адаптация */
@media (max-width: 768px) {
    .popup-overlay { align-items: flex-end; }
    .popup-sheet { max-width: 640px; border-radius: 16px 16px 0 0; opacity: 1; transform: translateY(100%); transition: transform 0.28s ease; }
    .popup-overlay.show .popup-sheet { transform: translateY(0); }
    .popup-overlay.closing .popup-sheet { transform: translateY(100%); }
}

@media (prefers-reduced-motion: reduce) { .popup-overlay, .popup-sheet { transition: none; } }

