/* ============================================================
   ОПРОС ПОДПИСЧИКОВ — стили
   Загружается в файловый менеджер Tilda и подключается
   ссылкой из HTML-блока T123.
   ============================================================ */

#alnSurvey{--navy-deep:#0A1638;
    --navy:#16296B;
    --navy-soft:#28398C;
    --gold:#C9A227;
    --gold-light:#EFD888;
    --gold-deep:#9C7C13;
    --blush:#E97FA9;
    --bg:#F2F4FA;
    --card:#FFFFFF;
    --ink:#12142B;
    --ink-soft:#5B5F7A;
    --ink-faint:#9498B3;
    --line:#E5E8F3;
    --danger:#D64545;
    --radius-lg:28px;
    --radius-md:18px;
    --radius-sm:12px;
    --shadow-card:0 20px 50px -25px rgba(10,22,56,0.25);
    --shadow-soft:0 10px 30px -15px rgba(10,22,56,0.18);}
#alnSurvey *{box-sizing:border-box;}
#alnSurvey{margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:'Manrope',system-ui,sans-serif;
    -webkit-font-smoothing:antialiased;}
#alnSurvey h1, #alnSurvey h2, #alnSurvey h3, #alnSurvey .display{font-family:'Unbounded',system-ui,sans-serif;}
#alnSurvey .progress-wrap{position:fixed; top:0; left:0; right:0; height:4px;
    background:rgba(10,22,56,0.08); z-index:100;}
#alnSurvey .progress-bar{height:100%; width:0%;
    background:linear-gradient(90deg,var(--gold-deep),var(--gold),var(--gold-light));
    transition:width .12s linear;}
#alnSurvey .banner{position:relative;
    min-height:340px;
    display:flex;
    align-items:flex-end;
    background: linear-gradient(135deg, var(--navy-deep), var(--navy));
    overflow:hidden;
    padding:56px 24px 90px;}
#alnSurvey .banner::before{
    content:"";
    position:absolute; inset:0;
    background-image:
      linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 42px 100%;
    opacity:0.5;}
#alnSurvey .banner-bars{position:absolute; right:0; bottom:0; left:0; height:55%;
    display:flex; align-items:flex-end; gap:14px;
    padding:0 6%;
    opacity:0.35;
    pointer-events:none;}
#alnSurvey .banner-bars span{flex:1;
    background:linear-gradient(180deg, var(--gold-light), transparent);
    border-radius:4px 4px 0 0;}
#alnSurvey .banner-photo{position:absolute;
    right:-40px; bottom:-20px;
    width:340px; max-width:46vw;
    aspect-ratio:3/4;
    border-radius:24px;
    overflow:hidden;
    box-shadow: var(--shadow-card);}
#alnSurvey .banner-photo img{position:absolute; inset:0; width:100%; height:100%;
    object-fit:cover; object-position:top center; border-radius:24px; display:block;}
#alnSurvey .banner-content{position:relative; z-index:2; max-width:560px;}
#alnSurvey .banner-eyebrow{display:inline-flex; align-items:center; gap:8px;
    color:var(--gold-light);
    font-size:13px; font-weight:700; letter-spacing:.14em; text-transform:uppercase;
    margin-bottom:14px;}
#alnSurvey .banner-eyebrow::before{content:"";width:22px;height:1px;background:var(--gold-light);}
#alnSurvey .banner h1{color:#fff; font-size:clamp(28px,4.4vw,42px); line-height:1.12; margin:0 0 12px; font-weight:700;}
#alnSurvey .banner p{color:rgba(255,255,255,0.72); font-size:15px; max-width:400px; margin:0;}
#alnSurvey .shell{max-width:720px; margin:0 auto; padding:0 20px 80px;}
#alnSurvey .intro-card{background:var(--card);
    border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card);
    padding:38px 34px;
    margin-top:-58px;
    position:relative; z-index:3;}
#alnSurvey .intro-card h2{font-size:24px; margin:0 0 14px; line-height:1.3;}
#alnSurvey .intro-card p{color:var(--ink-soft); font-size:15.5px; line-height:1.65; margin:0 0 18px;}
#alnSurvey .intro-meta{display:flex; align-items:center; gap:10px;
    font-size:13.5px; color:var(--navy);
    background:linear-gradient(90deg,#F4EBC9,#FBF6E3);
    border:1px solid #EAD9A0;
    padding:10px 14px; border-radius:12px; font-weight:700;
    margin-bottom:18px; width:fit-content;}
#alnSurvey .required-note{display:flex; gap:10px; align-items:flex-start;
    background:#FDF1F1; border:1px solid #F3D5D5; color:#A23434;
    border-radius:12px; padding:12px 14px; font-size:13.5px; font-weight:600; line-height:1.5;}
#alnSurvey .required-note b{color:var(--danger); font-size:16px;}
#alnSurvey .block{margin-top:34px;
    opacity:0; transform:translateY(18px);
    transition:opacity .55s ease, transform .55s ease;}
#alnSurvey .block.in-view{opacity:1; transform:none;}
#alnSurvey .block-head{display:flex; align-items:baseline; gap:12px; margin:0 4px 16px; flex-wrap:nowrap;}
#alnSurvey .block-num{font-family:'Unbounded',sans-serif; font-size:13px; font-weight:700;
    color:var(--gold-deep);
    background:linear-gradient(90deg,#F4EBC9,#FBF6E3);
    border:1px solid #EAD9A0;
    padding:4px 11px; border-radius:20px; letter-spacing:.04em;
    white-space:nowrap; flex:none;}
#alnSurvey .block-title{font-size:20px; font-weight:700; color:var(--navy-deep); margin:0;}
#alnSurvey .field{background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius-md);
    padding:22px 24px;
    margin-bottom:16px;
    box-shadow:var(--shadow-soft);}
#alnSurvey .field-label{font-size:15.5px; font-weight:700; color:var(--ink); margin:0 0 4px; line-height:1.5;
    display:block;}
#alnSurvey .field-label .star{color:var(--danger); margin-left:2px;}
#alnSurvey .field-hint{font-size:13px; color:var(--ink-faint); margin:0 0 14px; line-height:1.5;}
#alnSurvey input[type="text"], #alnSurvey input[type="tel"], #alnSurvey textarea{width:100%;
    border:1.5px solid var(--line);
    border-radius:var(--radius-sm);
    padding:13px 15px;
    font-family:'Manrope',sans-serif;
    font-size:16px;
    color:var(--ink);
    background:#FBFBFE;
    transition:border-color .15s ease, box-shadow .15s ease;
    margin-top:10px;}
#alnSurvey textarea{min-height:96px; resize:vertical; line-height:1.55;}
#alnSurvey input:focus, #alnSurvey textarea:focus{outline:none; border-color:var(--navy-soft);
    box-shadow:0 0 0 4px rgba(40,57,140,0.10);
    background:#fff;}
#alnSurvey .chip-group{display:flex; flex-wrap:wrap; gap:10px; margin-top:12px;}
#alnSurvey .other-box{width:100%;
    border:1.5px solid var(--line);
    border-radius:var(--radius-sm);
    padding:12px 15px;
    font-family:'Manrope',sans-serif;
    font-size:16px;
    color:var(--ink);
    background:#FBFBFE;
    margin-top:12px;
    min-height:70px;
    resize:vertical;}
#alnSurvey .other-box:focus{outline:none; border-color:var(--navy-soft);
    box-shadow:0 0 0 4px rgba(40,57,140,0.10);
    background:#fff;}
#alnSurvey .other-box.hidden{display:none;}
#alnSurvey .chip{position:relative;
    cursor:pointer;}
#alnSurvey .chip input{position:absolute; opacity:0; width:0; height:0;}
#alnSurvey .chip-face{display:flex; align-items:center; gap:8px;
    padding:10px 16px;
    border-radius:30px;
    border:1.5px solid var(--line);
    background:#FBFBFE;
    font-size:14px; font-weight:600; color:var(--ink-soft);
    transition:all .15s ease;
    user-select:none;}
#alnSurvey .chip-face::before{content:"";
    width:16px; height:16px; border-radius:5px;
    border:1.5px solid var(--ink-faint);
    background:#fff;
    flex:none;
    transition:all .15s ease;
    display:flex; align-items:center; justify-content:center;
    background-size:11px;
    background-repeat:no-repeat;
    background-position:center;}
#alnSurvey .chip input:checked + .chip-face{border-color:var(--gold-deep);
    background:linear-gradient(90deg,#F6ECC9,#FCF7E6);
    color:var(--navy-deep);
    box-shadow:0 6px 16px -8px rgba(201,162,39,0.55);}
#alnSurvey .chip input:checked + .chip-face::before{background-color:var(--gold-deep);
    border-color:var(--gold-deep);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.2 11.5L13 4.5' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");}
#alnSurvey .chip input:focus-visible + .chip-face{box-shadow:0 0 0 4px rgba(40,57,140,0.18);}
#alnSurvey .field-error{display:none; align-items:center; gap:6px;
    color:var(--danger); font-size:13px; font-weight:700; margin-top:12px;}
#alnSurvey .field.has-error{border-color:var(--danger);}
#alnSurvey .field.has-error .field-error{display:flex;}
#alnSurvey .field.has-error input[type="text"], #alnSurvey .field.has-error input[type="tel"], #alnSurvey .field.has-error textarea{border-color:var(--danger);}
#alnSurvey .consent{background:linear-gradient(135deg, var(--navy-deep), var(--navy));
    border-radius:var(--radius-md);
    padding:20px 22px;
    margin-bottom:16px;
    display:flex; gap:16px; align-items:flex-start;
    cursor:pointer;
    border:1.5px solid transparent;
    transition:border-color .15s ease;}
#alnSurvey .consent input{position:absolute; opacity:0; width:0; height:0;}
#alnSurvey .consent-box{flex:none; width:24px; height:24px; border-radius:8px;
    border:1.5px solid rgba(255,255,255,0.4);
    margin-top:2px;
    background-size:14px; background-repeat:no-repeat; background-position:center;
    transition:all .15s ease;}
#alnSurvey .consent input:checked ~ .consent-box{background-color:var(--gold);
    border-color:var(--gold);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8.5L6.2 11.5L13 4.5' stroke='%2316296B' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");}
#alnSurvey .consent-text{color:rgba(255,255,255,0.88); font-size:14.5px; line-height:1.6;}
#alnSurvey .consent-text b{color:#fff;}
#alnSurvey .submit-wrap{margin-top:36px; text-align:center;}
#alnSurvey .submit-btn{appearance:none; border:none; cursor:pointer;
    font-family:'Unbounded',sans-serif;
    font-size:15.5px; font-weight:600; color:var(--navy-deep);
    background:linear-gradient(90deg,var(--gold-light),var(--gold));
    padding:17px 42px; border-radius:40px;
    box-shadow:0 16px 30px -12px rgba(201,162,39,0.55);
    transition:transform .15s ease, box-shadow .15s ease;}
#alnSurvey .submit-btn:hover{transform:translateY(-2px); box-shadow:0 20px 36px -12px rgba(201,162,39,0.65);}
#alnSurvey .submit-btn:disabled{opacity:.6; cursor:progress; transform:none;}
#alnSurvey .submit-note{margin-top:14px; font-size:12.5px; color:var(--ink-faint);}
#alnSurvey .top-error{display:none;
    background:#FDF1F1; border:1px solid #F3D5D5; color:#A23434;
    border-radius:12px; padding:14px 16px; font-size:14px; font-weight:700;
    margin-top:20px; text-align:center;}
#alnSurvey .success{display:none;
    background:var(--card); border-radius:var(--radius-lg);
    box-shadow:var(--shadow-card); padding:56px 34px; text-align:center;
    margin-top:-58px; position:relative; z-index:3;}
#alnSurvey .success-badge{width:74px; height:74px; margin:0 auto 22px; border-radius:50%;
    background:linear-gradient(135deg,var(--gold-light),var(--gold));
    display:flex; align-items:center; justify-content:center;
    box-shadow:0 16px 30px -10px rgba(201,162,39,0.55);}
#alnSurvey .success h2{font-size:23px; margin:0 0 10px; color:var(--navy-deep);}
#alnSurvey .success p{color:var(--ink-soft); font-size:15px; line-height:1.6; max-width:420px; margin:0 auto;}

/* ─────────── ДОБАВЛЕНО: доставка, черновик, кнопка возврата ─────────── */

#alnSurvey .is-hidden{display:none !important;}

/* Кнопка «Вернуться в Телеграм-канал» на экране благодарности */
#alnSurvey .tg-btn{display:inline-flex; align-items:center; gap:10px;
    margin-top:26px;
    font-family:'Unbounded',sans-serif;
    font-size:15px; font-weight:600; color:var(--navy-deep);
    background:linear-gradient(90deg,var(--gold-light),var(--gold));
    padding:16px 34px; border-radius:40px; text-decoration:none;
    box-shadow:0 16px 30px -12px rgba(201,162,39,0.55);
    transition:transform .15s ease, box-shadow .15s ease;}
#alnSurvey .tg-btn:hover{transform:translateY(-2px); box-shadow:0 20px 36px -12px rgba(201,162,39,0.65);}

/* Сообщение о неудачной отправке */
#alnSurvey .send-error{display:none;
    background:#FDF1F1; border:1px solid #F3D5D5; color:#A23434;
    border-radius:var(--radius-md); padding:18px 20px; font-size:14.5px;
    line-height:1.6; margin-top:20px; text-align:left; font-weight:600;}
#alnSurvey .send-error a{color:#A23434; font-weight:800;}
#alnSurvey .send-error.visible{display:block;}

/* Плашка «черновик восстановлен» */
#alnSurvey .draft-note{display:none;
    align-items:center; gap:10px; justify-content:space-between;
    background:linear-gradient(90deg,#F4EBC9,#FBF6E3);
    border:1px solid #EAD9A0; color:var(--navy);
    border-radius:12px; padding:12px 14px; font-size:13.5px; font-weight:700;
    margin-top:16px; line-height:1.45;}
#alnSurvey .draft-note.visible{display:flex;}
#alnSurvey .draft-clear{appearance:none; border:none; background:transparent;
    color:var(--gold-deep); font-family:'Manrope',sans-serif;
    font-size:13px; font-weight:800; cursor:pointer; text-decoration:underline;
    white-space:nowrap; padding:0;}

/* Подсказка про контакт, когда отмечена галочка */
#alnSurvey .contact-required-hint{display:none; color:var(--gold-deep); font-weight:700;}
#alnSurvey .contact-required .contact-required-hint{display:block;}

@media (max-width:640px){
#alnSurvey .banner{padding:44px 18px 130px; min-height:auto;}
#alnSurvey .banner-photo{width:220px; max-width:52vw; right:-16px; bottom:-46px;}
#alnSurvey .intro-card{padding:28px 22px;}
#alnSurvey .field{padding:18px 18px;}
#alnSurvey .shell{padding:0 14px 64px;}
#alnSurvey .chip-face{padding:11px 15px; font-size:14.5px;}
#alnSurvey .block-head{flex-wrap:wrap; gap:8px;}
#alnSurvey .block-title{font-size:18px;}
#alnSurvey .submit-btn{width:100%; padding:17px 20px; font-size:15px;}
#alnSurvey .tg-btn{width:100%; justify-content:center;}
#alnSurvey .success{padding:40px 22px;}
#alnSurvey .draft-note{flex-direction:column; align-items:flex-start;}
}

@media (prefers-reduced-motion: reduce){
#alnSurvey .block{transition:none; opacity:1; transform:none;}
}
