/* Визия: бял прозорец, топъл фон и Lora от одобрените страници с резултати; червеното на сайта за контури и акценти. */
.ot-native-assessment {
    --ota-red: #dc2626;
    --ota-red-dark: #b91c1c;
    --ota-red-soft: #fef2f2;
    --ota-red-tint: #fbe5e3;
    --ota-ink: #1f2937;
    --ota-muted: #6b7280;
    --ota-line: #ece6df;
    --ota-paper: #fbf8f4;
    --ota-edge: #dccfc2;
    --ota-lift: 0 1px 1px rgba(31, 22, 20, .05), 0 6px 16px -8px rgba(31, 22, 20, .22);
    --ota-white: #fff;
    --ota-serif: "Lora", Georgia, "Times New Roman", serif;
    --ota-sans: "Nunito Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.ot-assessment-modal-open { overflow: hidden; }
.ot-assessment-modal[hidden] { display: none !important; }
.ot-assessment-modal { position: fixed; inset: 0; z-index: 999999; opacity: 0; transition: opacity .2s ease; }
.ot-assessment-modal.is-open { opacity: 1; }
.ota {
    position: absolute; inset: 0;
    display: grid; grid-template-rows: auto 1fr auto; overflow: hidden;
    background: radial-gradient(110% 55% at 100% 0%, rgba(220, 38, 38, .06), transparent 60%), var(--ota-paper);
    color: var(--ota-ink); font-family: var(--ota-sans); outline: none;
}
.ota *, .ota *::before, .ota *::after { box-sizing: border-box; }
.ota:focus { outline: none; }

/* Хедър като stories: назад · секция + сегменти · затвори */
.ota-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) 56px; align-items: center; gap: 8px; padding: 12px clamp(12px, 3vw, 28px) 14px; border-bottom: 1px solid var(--ota-line); background: rgba(255, 255, 255, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ota-head__side { display: flex; align-items: center; }
.ota-head__side--end { justify-content: flex-end; }
.ota-logo { width: 40px; height: auto; }
.ota-logo[hidden] { display: none; }
.ot-native-assessment .ota-icon-btn { display: grid; place-items: center; width: 42px; height: 42px; min-width: 0; min-height: 0; padding: 0 !important; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ota-ink); line-height: 0; cursor: pointer; transition: background .16s ease, color .16s ease; }
.ot-native-assessment .ota-icon-btn:hover { background: var(--ota-red-soft); color: var(--ota-red); }
.ota-icon-btn[hidden] { display: none !important; }
.ota-icon-btn svg { display: block; pointer-events: none; }
.ota-head__center { display: grid; justify-items: center; gap: 9px; min-width: 0; }
.ota-section { color: var(--ota-ink); font-family: var(--ota-serif); font-size: 18px; font-weight: 600; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ota-segments { display: flex; gap: 6px; width: min(320px, 100%); }
.ota-segment { position: relative; flex: 1; height: 4px; overflow: hidden; border-radius: 4px; background: var(--ota-line); }
.ota-segment i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--ota-red); transition: width .4s ease; }
/* Сцена и стъпки */
.ota-stage { position: relative; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.ota-stage.is-animating { overflow-y: hidden; }
.ota-step { min-width: 0; max-width: 820px; min-height: 100%; margin: 0 auto; padding: clamp(28px, 5vh, 52px) clamp(22px, 6vw, 64px); border: 0; display: flex; flex-direction: column; justify-content: center; }
.ota-step--wide { max-width: 980px; }
.ota-step[hidden] { display: none !important; }
.ota-step.is-entering { animation: otaEnter .3s ease-out both; }
.ota-step.is-entering-back { animation: otaEnterBack .3s ease-out both; }
.ota-step.is-leaving { animation: otaLeave .18s ease both; }
.ota-step.is-leaving-back { animation: otaLeaveBack .18s ease both; }
/* Само плавно избледняване — без движение нагоре/надолу, за да не изглежда като подскок. */
@keyframes otaEnter { from { opacity: 0; } to { opacity: 1; } }
@keyframes otaEnterBack { from { opacity: 0; } to { opacity: 1; } }
@keyframes otaLeave { to { opacity: 0; } }
@keyframes otaLeaveBack { to { opacity: 0; } }

.ota-step legend { float: left; width: 100%; margin: 0 0 10px; padding: 0; color: var(--ota-ink); font-family: var(--ota-serif); font-size: clamp(25px, 3vw, 36px); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; text-align: center; text-wrap: balance; }
.ota-step legend + * { clear: both; }
.ota-help { max-width: 560px; margin: 0 auto 26px; color: var(--ota-muted); font-size: 15px; line-height: 1.55; text-align: center; }

/* Зони със снимки — големи карти, по 2 на ред на телефон; „Цяло тяло“ накрая, по-голяма и центрирана */
.ota-zones { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ota-zone { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1.5px solid var(--ota-edge); border-radius: 20px; background: var(--ota-white); cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: 0 2px 6px rgba(31, 22, 20, .04), 0 14px 30px -20px rgba(31, 22, 20, .3); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.ota-zone input { position: absolute; opacity: 0; pointer-events: none; }
.ota-zone__media { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--ota-paper); }
.ota-zone__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.ota-zone__bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 12px 12px 14px; background: var(--ota-paper); }
.ota-zone__name { color: var(--ota-ink); font-size: 15px; font-weight: 700; line-height: 1.25; }
.ota-zone__go { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--ota-ink); color: var(--ota-white); transition: background .18s ease; }
@media (hover: hover) { .ota-zone:hover { border-color: #e7b9b5; } }
.ota-zone:hover .ota-zone__go { background: var(--ota-red); }
.ota-zone:has(input:focus-visible) { outline: 3px solid rgba(220, 38, 38, .25); outline-offset: 2px; }
.ota-zone:has(input:checked) { border-color: var(--ota-red); box-shadow: 0 0 0 2px var(--ota-red), 0 16px 30px -16px rgba(220, 38, 38, .5); }
.ota-zone:has(input:checked) .ota-zone__bar { background: var(--ota-red-soft); }
.ota-zone:has(input:checked) .ota-zone__name { color: var(--ota-red-dark); }
.ota-zone:has(input:checked) .ota-zone__go { background: var(--ota-red); }
.ota-zone--all { grid-column: 1 / -1; justify-self: center; width: min(100%, 420px); }
.ota-zone--all .ota-zone__media { aspect-ratio: 16 / 10; background: var(--ota-white); }
.ota-zone--all .ota-zone__media img { object-fit: contain; }
.ota-zone--all .ota-zone__bar { justify-content: center; gap: 12px; }
.ota-zone--all .ota-zone__name { font-size: 17px; }
/* Карти с иконки */
.ota-options { display: grid; gap: 14px; }
.ota-options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ota-options--2 .ota-option:last-child:nth-child(odd) { grid-column: 1 / -1; }
.ota-options--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.ota-option {
    position: relative; display: flex; align-items: center; gap: 14px; min-height: 70px; padding: 14px 54px 14px 14px;
    border: 1.5px solid var(--ota-edge); border-radius: 16px; background: var(--ota-white);
    color: var(--ota-ink); font-family: var(--ota-sans); font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -.005em; cursor: pointer; -webkit-tap-highlight-color: transparent;
    box-shadow: var(--ota-lift); transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.ota-option:active, .ota-time:active { background: var(--ota-red-soft); }
.ota-option input { position: absolute; opacity: 0; pointer-events: none; }
.ota-option__icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--ota-red-tint); color: var(--ota-red); transition: background .18s ease, color .18s ease; }
.ota-option__icon svg { width: 22px; height: 22px; }
.ota-option__label { flex: 1; }
.ota-option__check { position: absolute; right: 16px; top: 50%; width: 24px; height: 24px; border: 2px solid #bdb0a3; border-radius: 50%; transform: translateY(-50%); transition: background-color .18s ease, border-color .18s ease; }
@media (hover: hover) { .ota-option:hover, .ota-time:hover { border-color: #e0a29c; box-shadow: 0 10px 24px -10px rgba(31, 22, 20, .28); } }
.ota-option:has(input:focus-visible) { outline: 3px solid rgba(220, 38, 38, .25); outline-offset: 2px; }
.ota-option:has(input:checked) { border-color: var(--ota-red); background: var(--ota-red-soft); color: var(--ota-red-dark); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.ota-option:has(input:checked) .ota-option__icon { background: var(--ota-red); color: var(--ota-white); }
.ota-option:has(input:checked) .ota-option__check {
    border-color: var(--ota-red); background: var(--ota-red) no-repeat center / 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.ota-options--3 .ota-option { flex-direction: column; justify-content: center; min-height: 140px; padding: 20px 14px 16px; text-align: center; }
.ota-options--3 .ota-option__check { top: 12px; right: 12px; transform: none; }

/* Времева линия */
.ota-timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.ota-timeline::before { content: ""; position: absolute; left: 10%; right: 10%; top: 36px; height: 2px; background: linear-gradient(90deg, #f3d3cf, var(--ota-red)); opacity: .6; }
.ota-time { position: relative; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 112px; padding: 20px 8px 14px; border: 1.5px solid var(--ota-edge); border-radius: 16px; background: var(--ota-white); box-shadow: var(--ota-lift); text-align: center; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ota-time input { position: absolute; opacity: 0; pointer-events: none; }
.ota-time__dot { position: relative; z-index: 1; display: block; width: calc(10px + var(--level) * 4px); height: calc(10px + var(--level) * 4px); margin-top: calc(14px - var(--level) * 2px); border: 3px solid var(--ota-white); border-radius: 50%; background: #e9c2bd; box-shadow: 0 0 0 1px #e9c2bd; transition: background .18s ease, box-shadow .18s ease; }
.ota-time__label { color: var(--ota-ink); font-size: 15px; font-weight: 600; line-height: 1.3; }
.ota-time:has(input:checked) { background: var(--ota-red-soft); border-color: var(--ota-red); box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.ota-time:has(input:checked) .ota-time__dot { background: var(--ota-red); box-shadow: 0 0 0 1px var(--ota-red), 0 0 0 7px rgba(220, 38, 38, .14); }
.ota-time:has(input:checked) .ota-time__label { color: var(--ota-red-dark); }

/* Екран „Разбрахме“ — изчезва сам като story */
.ota-step--story { align-items: center; text-align: center; }
.ota-badge { margin-bottom: 16px; padding: 6px 13px; border-radius: 999px; background: var(--ota-red); color: var(--ota-white); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ota-lead { max-width: 560px; margin: 4px auto 28px; color: var(--ota-muted); font-size: 18px; line-height: 1.6; }
.ota-timer { width: 160px; height: 4px; overflow: hidden; border-radius: 4px; background: var(--ota-line); }
.ota-timer span { display: block; width: 0; height: 100%; background: var(--ota-red); }
.ota-step--story:not(.is-running) .ota-timer { visibility: hidden; }
.ota-step--story.is-running .ota-timer span { animation: otaTimer var(--ota-story-ms, 4200ms) linear forwards; }
@keyframes otaTimer { to { width: 100%; } }

/* Екран „Анализираме…“ */
.ota-step--loading { align-items: center; }
.ota-spinner { width: 46px; height: 46px; margin-bottom: 18px; border: 4px solid var(--ota-red-tint); border-top-color: var(--ota-red); border-radius: 50%; animation: otaSpin .75s linear infinite; }
@keyframes otaSpin { to { transform: rotate(360deg); } }
.ota-checks { display: grid; gap: 12px; margin: 10px auto 0; padding: 0; list-style: none; }
.ota-checks li { display: flex; align-items: center; gap: 12px; color: var(--ota-muted); font-size: 17px; opacity: .4; transition: opacity .3s ease, color .3s ease; }
.ota-checks li::before { content: ""; width: 20px; height: 20px; flex: none; border: 2px solid #e5c8c3; border-radius: 50%; }
.ota-checks li.is-done { color: var(--ota-ink); opacity: 1; }
.ota-checks li.is-done::before { border-color: var(--ota-red); background: var(--ota-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.2 2.2 4.8-4.9' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 12px; }

/* Полета */
.ota-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 620px; margin: 0 auto; }
.ota-fields--single { grid-template-columns: 1fr; max-width: 460px; }
.ota-field { display: grid; gap: 6px; color: var(--ota-ink); font-size: 13px; font-weight: 700; }
.ota-field[hidden] { display: none; }
.ot-native-assessment .ota-field input, .ot-native-assessment .ota-field textarea {
    width: 100%; margin: 0; border: 1px solid #ddd3c8; border-radius: 12px; background: var(--ota-white); color: var(--ota-ink);
    font: inherit; font-size: 17px; font-weight: 400; box-shadow: none;
}
.ot-native-assessment .ota-field input { min-height: 54px; padding: 0 16px; }
.ot-native-assessment .ota-field textarea { padding: 13px 15px; resize: vertical; }
.ot-native-assessment .ota-field input:focus, .ot-native-assessment .ota-field textarea:focus { border-color: var(--ota-red); outline: 3px solid rgba(220, 38, 38, .12); }
.ota-field--area { width: 100%; max-width: 620px; margin: 18px auto 0; }
.ota-consent { display: grid; grid-template-columns: 20px 1fr; gap: 11px; width: 100%; max-width: 620px; margin: 20px auto 0; color: var(--ota-muted); font-size: 13px; line-height: 1.5; cursor: pointer; }
.ota-consent input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ota-red); }
.ota-consent a { color: var(--ota-ink); text-decoration: underline; }
.ota-trust { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 16px auto 0; color: var(--ota-muted); font-size: 12.5px; text-align: center; }
.ota-trust svg { width: 15px; height: 15px; flex: none; color: var(--ota-red); }

/* Качване */
.ota-upload { position: relative; display: grid; justify-items: center; gap: 12px; width: 100%; max-width: 560px; margin: 0 auto; padding: 40px 24px; border: 1.5px dashed #dcc9c1; border-radius: 20px; background: var(--ota-white); color: var(--ota-red); text-align: center; cursor: pointer; transition: border-color .18s ease, background .18s ease; }
.ota-upload:hover { border-color: var(--ota-red); background: var(--ota-red-soft); }
.ota-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ota-upload > svg { width: 40px; height: 40px; }
.ota-upload__btn { padding: 11px 22px; border-radius: 999px; background: var(--ota-ink); color: var(--ota-white); font-size: 14px; font-weight: 700; }
.ota-upload small { color: var(--ota-muted); font-size: 13px; }

/* Грешка */
.ota-error { margin: 14px 0 0; color: var(--ota-red-dark); font-size: 14px; font-weight: 600; text-align: center; }
.ota-error:empty { display: none; }

/* Долна лента — центрирана: подсказка или бутон */
.ota-foot { display: flex; align-items: center; justify-content: center; height: 76px; min-height: 76px; padding: 12px 24px; border-top: 1px solid var(--ota-line); background: rgba(255, 255, 255, .85); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ot-native-assessment .ota-next { width: min(100%, 420px); min-height: 50px; margin: 0; padding: 0 26px !important; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--ota-red), var(--ota-red-dark)); color: var(--ota-white); font: inherit; font-size: 16px; font-weight: 700; line-height: 1; cursor: pointer; box-shadow: 0 10px 24px rgba(220, 38, 38, .25); transition: box-shadow .16s ease, transform .16s ease; }
.ot-native-assessment .ota-next:hover { box-shadow: 0 14px 30px rgba(220, 38, 38, .32); transform: translateY(-1px); }
.ota-next[hidden], .ota-hint[hidden] { display: none !important; }
.ota-next:disabled { opacity: .6; cursor: wait; transform: none; }
.ota-hint { margin: 0; color: #9a8f86; font-size: 13px; text-align: center; }
.ot-assessment-honeypot { position: fixed !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

/* Таблет */
@media (max-width: 900px) {
    .ota-zones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Телефон */
@media (max-width: 760px) {
    .ota { inset: 0; border-radius: 0; }
    .ot-native-assessment .ota-close { top: 10px; right: 12px; width: 38px; height: 38px; }
    .ota-head { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 10px 8px 12px; }
    .ota-logo { width: 34px; }
    .ota-section { font-size: 17px; }
    .ota-sub { display: none; }
    .ota-kicker { font-size: 11px; letter-spacing: .1em; }
    .ota-kicker::before { width: 14px; }
    .ota-progress { margin-top: 10px; }
    .ota-step { padding: 20px 16px 24px; justify-content: flex-start; }
    .ota-step--story, .ota-step--loading { justify-content: center; }
    .ota-step legend { font-size: 24px; }
    .ota-help { margin-bottom: 16px; font-size: 14px; }
    .ota-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ota-zone { border-radius: 18px; }
    .ota-zone__bar { padding: 10px 10px 10px 12px; }
    .ota-zone__name { font-size: 14px; }
    .ota-zone__go { width: 26px; height: 26px; }
    .ota-zone--all { width: 100%; }
    .ota-options--2, .ota-options--3 { grid-template-columns: 1fr; }
    .ota-options--2 .ota-option:last-child:nth-child(odd) { grid-column: auto; }
    .ota-options { gap: 12px; }
    .ota-options--3 { gap: 16px; }
    .ota-option { min-height: 62px; padding: 12px 48px 12px 12px; font-size: 15px; }
    .ota-option__icon { width: 38px; height: 38px; }
    .ota-options--3 .ota-option { flex-direction: row; justify-content: flex-start; min-height: 58px; padding: 10px 46px 10px 12px; text-align: left; }
    .ota-options--3 .ota-option__check { top: 50%; right: 16px; transform: translateY(-50%); }
    .ota-timeline { grid-template-columns: 1fr; gap: 12px; }
    .ota-timeline::before { left: 29px; right: auto; top: 28px; bottom: 28px; width: 2px; height: auto; background: linear-gradient(180deg, #f3d3cf, var(--ota-red)); }
    .ota-time { flex-direction: row; gap: 16px; min-height: 58px; padding: 8px 14px; text-align: left; }
    .ota-time__dot { flex: none; width: calc(12px + var(--level) * 2px); height: calc(12px + var(--level) * 2px); margin: 0 calc(10px - var(--level) * 1px); }
    .ota-fields { grid-template-columns: 1fr; }
    .ota-lead { font-size: 16px; }
    .ota-foot { height: calc(74px + env(safe-area-inset-bottom, 0px)); min-height: calc(74px + env(safe-area-inset-bottom, 0px)); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }
    .ota-hint { font-size: 12.5px; }
    .ot-native-assessment .ota-next { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .ot-assessment-modal, .ota-progress span, .ota-step, .ota-option, .ota-zone, .ota-checks li, .ota-spinner { transition: none !important; animation: none !important; }
}

/* Бутон за 7-дневната програма на страницата с резултата (извън модала). */
.ot-program-download { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 0; padding: 16px 18px; border: 1px solid #f1d4d1; border-radius: 14px; background: #fffaf9; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.ot-program-download__text { display: grid; gap: 2px; color: #1f2937; font-size: 14px; }
.ot-program-download__text span { color: #6b7280; font-size: 12.5px; }
.ot-program-download__actions { display: flex; gap: 8px; }
.ot-program-download button { min-height: 42px; padding: 0 16px; border: 1px solid #dc2626; border-radius: 999px; background: #fff; color: #b91c1c; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; }
.ot-program-download button[data-program="download"] { background: #dc2626; color: #fff; }
.ot-program-download button:disabled { opacity: .7; cursor: wait; }
@media (max-width: 520px) { .ot-program-download__actions { width: 100%; } .ot-program-download button { flex: 1; } }
