/**
 * IVO — Рекламации · стилове на клиентската форма.
 * Маркер: RECLAMATIONS-20260812.
 *
 * Мобилно-първо: базовите правила са за телефон, разширенията са в media queries.
 * Без външни шрифтове и без CDN — наследяваме шрифта на темата и падаме на системния.
 * Всичко е под .ivo-rec, за да не влизаме в спор с темата на магазина.
 */

.ivo-rec {
    /* Цветовете са на едно място — темата може да ги пренапише отвън без да пипа правила.
       DESIGN-WARM-20260813: топли неутрали (premium-natural, в тон с бранда на босите
       обувки) вместо студения slate — крем, топъл въглен, маслинен за „готово/избрано". */
    --rec-ink: #26221c;            /* топъл въглен, не чисто черно */
    --rec-ink-soft: #5d5648;
    --rec-ink-faint: #a69d8c;
    --rec-line: #e7e1d5;           /* топла линия */
    --rec-bg: #ffffff;
    --rec-bg-soft: #faf7f1;        /* крем */
    --rec-accent: #2b261f;         /* CTA — тъмен топъл */
    --rec-accent-ink: #ffffff;
    --rec-select: #5d6b4d;         /* маслинено — избрано / изминати стъпки */
    --rec-focus: #a98d5f;          /* бронзов фокус-пръстен */
    --rec-danger: #c2410c;         /* топло червено (terracotta) */
    --rec-ok: #4d7c58;
    --rec-warn: #b45309;
    --rec-radius: 16px;
    --rec-shadow: 0 1px 2px rgba(38, 34, 28, .05), 0 6px 20px rgba(38, 34, 28, .06);

    box-sizing: border-box;
    max-width: 720px;
    margin: 0 auto;
    padding: 4px 0 24px;
    color: var(--rec-ink);
    font-family: inherit;
    font-size: 16px;               /* под 16px iOS зумва при фокус в поле */
    line-height: 1.5;
    text-align: left;
}

.ivo-rec *,
.ivo-rec *::before,
.ivo-rec *::after { box-sizing: border-box; }

.ivo-rec__shell { display: block; }

/* ── [hidden] ПОБЕЖДАВА всичко под .ivo-rec ────────────────────────────────
   Браузърът има свое правило `[hidden] { display: none }`, но то е в UA слоя и
   всяко наше `display: …` го надвива. JS скрива с `el.hidden = true` (стъпките,
   лентата с точките, предупреждението за снимките) — и елемент с изричен
   `display` просто оставаше на екрана: така индикаторът на стъпките се виждаше
   и на финалния екран.

   ⚠ Пазачът е нарочно за ВСЕКИ елемент с [hidden], не само за индикатора:
     следващият блок, който получи `display: flex/grid`, ще ухапе по същия начин.
     Затова: скриеш ли нещо с атрибута hidden, то СЕ СКРИВА. Искаш ли елемент,
     който се вижда, не му слагай hidden — не търси начин да надвиеш това правило. */
.ivo-rec [hidden],
.ivo-rec[hidden] { display: none !important; }

/* ── скрито само визуално (за екранни четци) ───────────────────────────── */
.ivo-rec__sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* ── съобщения ─────────────────────────────────────────────────────────── */
.ivo-rec__notice {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--rec-radius);
    border: 1px solid var(--rec-line);
    background: var(--rec-bg-soft);
    font-size: 14px;
}
.ivo-rec__notice--warn {
    border-color: #fcd34d;
    background: #fffbeb;
    color: var(--rec-warn);
}

/* ── индикатор на стъпките ─────────────────────────────────────────────────
   DESIGN-WARM-20260813: номерирани кръгчета със свързваща линия — казват „къде съм
   и колко остава" с един поглед; изминатите получават ✓. Само CSS counters, без
   промяна в HTML-а. */
.ivo-rec__progress {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    counter-reset: recstep;
}
.ivo-rec__dot {
    counter-increment: recstep;
    position: relative;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--rec-bg);
    border: 2px solid var(--rec-line);
    color: var(--rec-ink-faint);
    font-size: 13px;
    font-weight: 700;
    transition: background-color .2s ease, border-color .2s ease,
                color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.ivo-rec__dot::before { content: counter(recstep); }
.ivo-rec__dot + .ivo-rec__dot { margin-left: 22px; }
.ivo-rec__dot + .ivo-rec__dot::after {
    content: "";
    position: absolute;
    right: calc(100% + 2px);
    top: 50%;
    width: 20px;
    height: 2px;
    margin-top: -1px;
    background: var(--rec-line);
    transition: background-color .2s ease;
}
.ivo-rec__dot.is-done {
    background: var(--rec-select);
    border-color: var(--rec-select);
    color: #fff;
}
.ivo-rec__dot.is-done::before { content: "✓"; font-size: 13px; }
.ivo-rec__dot.is-done + .ivo-rec__dot::after,
.ivo-rec__dot.is-active + .ivo-rec__dot::after { background: var(--rec-select); }
.ivo-rec__dot.is-active {
    background: var(--rec-accent);
    border-color: var(--rec-accent);
    color: var(--rec-accent-ink);
    transform: scale(1.12);
    box-shadow: 0 0 0 4px rgba(169, 141, 95, .22);
}

/* ── заглавия ──────────────────────────────────────────────────────────── */
.ivo-rec__head { margin: 0 0 16px; }

.ivo-rec__eyebrow {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rec-ink-faint);
}
.ivo-rec__title {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--rec-ink);
}
.ivo-rec__title:focus { outline: none; }
.ivo-rec__sub {
    margin: 0;
    font-size: 15px;
    color: var(--rec-ink-soft);
}

/* ── карти и полета ────────────────────────────────────────────────────── */
.ivo-rec__card {
    background: var(--rec-bg);
    border: 1px solid var(--rec-line);
    border-radius: var(--rec-radius);
    padding: 18px;
    margin: 0 0 14px;
    box-shadow: var(--rec-shadow);
}

.ivo-rec__field { margin: 0 0 14px; }
.ivo-rec__field:last-child { margin-bottom: 0; }

.ivo-rec__field label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--rec-ink);
}

.ivo-rec input[type="text"],
.ivo-rec input[type="tel"],
.ivo-rec input[type="email"],
.ivo-rec input[type="url"],
.ivo-rec textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font: inherit;
    font-size: 16px;
    color: var(--rec-ink);
    background: var(--rec-bg);
    border: 1px solid var(--rec-line);
    border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ivo-rec textarea { resize: vertical; min-height: 96px; }

.ivo-rec input:focus,
.ivo-rec textarea:focus {
    outline: none;
    border-color: var(--rec-focus);
    box-shadow: 0 0 0 3px rgba(169, 141, 95, .18);
}

.ivo-rec__hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--rec-ink-soft);
}
.ivo-rec__hint a { color: inherit; }

.ivo-rec__grid { display: grid; grid-template-columns: 1fr; gap: 0; }

.ivo-rec__note {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-left: 3px solid var(--rec-warn);
    background: #fffbeb;
    border-radius: 0 10px 10px 0;
    font-size: 14px;
    color: var(--rec-warn);
}

.ivo-rec__error {
    margin: 10px 0 0;
    min-height: 1em;
    font-size: 14px;
    font-weight: 600;
    color: var(--rec-danger);
}
.ivo-rec__error:empty { margin: 0; min-height: 0; }

.ivo-rec__warn {
    margin: 12px 0 0;
    font-size: 14px;
    color: var(--rec-warn);
}

/* ── бутони ────────────────────────────────────────────────────────────── */
.ivo-rec__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;             /* палец, не курсор */
    padding: 12px 20px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s ease, opacity .15s ease, background-color .15s ease;
}
.ivo-rec__btn:disabled { opacity: .55; cursor: default; }
.ivo-rec__btn:not(:disabled):active { transform: translateY(1px); }
.ivo-rec__btn:focus-visible {
    outline: 3px solid rgba(169, 141, 95, .45);
    outline-offset: 2px;
}

.ivo-rec__btn--primary {
    background: var(--rec-accent);
    color: var(--rec-accent-ink);
    box-shadow: 0 1px 2px rgba(38, 34, 28, .18);
}
.ivo-rec__btn--primary:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(38, 34, 28, .22);
}
.ivo-rec__btn--ghost {
    background: transparent;
    color: var(--rec-ink-soft);
    border-color: var(--rec-line);
}
.ivo-rec__btn--ghost:not(:disabled):hover {
    background: var(--rec-bg-soft);
    color: var(--rec-ink);
}
.ivo-rec__btn--block { width: 100%; }

.ivo-rec__row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}
.ivo-rec__row .ivo-rec__btn--primary { flex: 1 1 auto; }

/* ── списък с артикули ─────────────────────────────────────────────────── */
.ivo-rec__items { display: grid; gap: 10px; }

.ivo-rec__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    text-align: left;
    background: var(--rec-bg);
    border: 1px solid var(--rec-line);
    border-radius: var(--rec-radius);
    cursor: pointer;
    font: inherit;
    color: inherit;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.ivo-rec__item:not(.is-blocked):hover {
    border-color: var(--rec-ink-faint);
    box-shadow: var(--rec-shadow);
}
.ivo-rec__item:focus-visible {
    outline: 3px solid rgba(169, 141, 95, .45);
    outline-offset: 2px;
}
.ivo-rec__item.is-selected {
    border-color: var(--rec-select);
    background: color-mix(in srgb, var(--rec-select) 7%, var(--rec-bg));
    box-shadow: 0 0 0 2px var(--rec-select) inset;
}
/* Избраният артикул получава ✓ в маслинен кръг — вижда се какво е избрано. */
.ivo-rec__item.is-selected .ivo-rec__item-mark::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: var(--rec-select);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
}
.ivo-rec__item.is-blocked {
    cursor: not-allowed;
    opacity: .72;
    background: var(--rec-bg-soft);
}

.ivo-rec__item-img {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--rec-bg-soft);
    border: 1px solid var(--rec-line);
}
.ivo-rec__item-img--empty { display: block; }

.ivo-rec__item-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.ivo-rec__item-name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
}
.ivo-rec__item-meta {
    font-size: 13px;
    color: var(--rec-ink-soft);
}
.ivo-rec__item-lock {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rec-warn);
}
.ivo-rec__item-mark {
    flex: 0 0 auto;
    font-size: 18px;
    line-height: 1;
}

/* ── избраният артикул над описанието ──────────────────────────────────── */
.ivo-rec__chosen {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0 0 14px;
    padding: 10px 12px;
    background: var(--rec-bg-soft);
    border-radius: 10px;
}
.ivo-rec__chosen:empty { display: none; }
.ivo-rec__chosen-label {
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rec-ink-faint);
}
.ivo-rec__chosen-name { font-weight: 600; }

/* ── начини за удовлетворяване ─────────────────────────────────────────── */
.ivo-rec__remedies {
    display: grid;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    border: 0;
}

.ivo-rec__remedy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--rec-bg);
    border: 1px solid var(--rec-line);
    border-radius: var(--rec-radius);
    cursor: pointer;
}
.ivo-rec__remedy input[type="radio"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 2px 0 0;
    accent-color: var(--rec-accent);
}
/* Класът идва от JS; :has() е за браузърите, които го знаят — двете правят едно и също. */
.ivo-rec__remedy.is-selected,
.ivo-rec__remedy:has(input:checked) {
    border-color: var(--rec-accent);
    box-shadow: 0 0 0 2px var(--rec-accent) inset;
}
.ivo-rec__remedy:focus-within {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}
.ivo-rec__remedy-body { display: flex; flex-direction: column; gap: 3px; }
.ivo-rec__remedy-title { font-weight: 600; }
.ivo-rec__remedy-desc { font-size: 14px; color: var(--rec-ink-soft); }

/* ── снимки ────────────────────────────────────────────────────────────── */
.ivo-rec__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 16px;
    text-align: center;
    border: 2px dashed var(--rec-line);
    border-radius: var(--rec-radius);
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.ivo-rec__drop::before {
    content: "🖼️";
    font-size: 28px;
    line-height: 1;
    margin-bottom: 2px;
}
.ivo-rec__drop:hover { border-color: var(--rec-select); background: var(--rec-bg-soft); }
/* Клавиатурен фокус: скритото файлово поле е вътре — рамката показва къде си. */
.ivo-rec__drop { position: relative; }
.ivo-rec__drop:focus-within {
    outline: 3px solid rgba(169, 141, 95, .45);
    outline-offset: 2px;
}
/* Влачене над зоната — тя вече и РАБОТИ като dropzone, не само изглежда така. */
.ivo-rec__drop.is-drag {
    border-color: var(--rec-select);
    background: color-mix(in srgb, var(--rec-select) 8%, var(--rec-bg));
}
.ivo-rec__drop-title { font-weight: 600; }
.ivo-rec__drop-hint { font-size: 13px; color: var(--rec-ink-soft); }
.ivo-rec__drop input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
}

/* Бутон „Снимай с камерата" — отваря директно камерата (JPEG, без HEIC капана). */
.ivo-rec__camera-row { margin: 10px 0 0; text-align: center; }
.ivo-rec__camera { position: relative; overflow: hidden; display: inline-flex; }
.ivo-rec__camera input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    overflow: hidden;
}
.ivo-rec__camera:focus-within {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 2px;
}
.ivo-rec__again-row { margin: 18px 0 0; }

.ivo-rec__thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
    gap: 8px;
    margin-top: 12px;
}
.ivo-rec__thumbs:empty { margin-top: 0; }

.ivo-rec__thumb { position: relative; }
.ivo-rec__thumb img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--rec-line);
}
.ivo-rec__thumb-del {
    position: absolute;
    top: -8px;
    right: -8px;
    /* 40px видим кръг ≈ реален тап-таргет: 28px беше под минимума и палецът
       уцелваше миниатюрата (или съседния ✕). */
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
    color: var(--rec-accent-ink);
    background: var(--rec-ink);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}

/* PDF в списъка с приложения — иконка + име (няма какво да се рисува в <img>). */
.ivo-rec__thumb-pdf {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 6px;
    font-size: 11px;
    text-align: center;
    word-break: break-all;
    border-radius: 10px;
    border: 1px solid var(--rec-line);
    background: var(--rec-bg-soft);
    color: var(--rec-ink-soft);
}

/* ── преглед ───────────────────────────────────────────────────────────── */
.ivo-rec__summary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px 16px;
    margin: 0 0 14px;
}
.ivo-rec__summary dt {
    font-size: 13px;
    color: var(--rec-ink-faint);
}
.ivo-rec__summary dd {
    margin: 0 0 10px;
    font-weight: 600;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.ivo-rec__summary dd:last-child { margin-bottom: 0; }

/* ── край ──────────────────────────────────────────────────────────────── */
.ivo-rec__done {
    text-align: center;
    padding: 8px 0 4px;
}
.ivo-rec__done-mark {
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--rec-ok) 12%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ivoRecPop .45s cubic-bezier(.2, 1.4, .4, 1) both;
}
.ivo-rec__done-mark svg {
    width: 40px;
    height: 40px;
    fill: none;
    stroke: var(--rec-ok);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* Отметката се „изписва" — дребен празничен момент, без конфети. */
.ivo-rec__done-mark svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: ivoRecDraw .5s .2s ease forwards;
}
@keyframes ivoRecPop { from { transform: scale(.55); opacity: 0; } }
@keyframes ivoRecDraw { to { stroke-dashoffset: 0; } }

.ivo-rec__ref-label {
    margin: 18px 0 6px;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rec-ink-faint);
}
.ivo-rec__ref {
    margin: 0 auto;
    display: inline-block;
    padding: 10px 22px;
    font-size: clamp(26px, 6vw, 32px);
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--rec-ink);
    background: var(--rec-bg-soft);
    border: 1px dashed var(--rec-line);
    border-radius: 12px;
    overflow-wrap: anywhere;
}
.ivo-rec__ref-date {
    margin: 4px 0 12px;
    font-size: 14px;
    color: var(--rec-ink-soft);
}

/* ── начини за подаване (винаги видимо) ────────────────────────────────── */
.ivo-rec__channels {
    margin: 22px 0 0;
    padding: 16px;
    background: var(--rec-bg-soft);
    border: 1px solid var(--rec-line);
    border-radius: var(--rec-radius);
    font-size: 14px;
    color: var(--rec-ink-soft);
}
.ivo-rec__channels-title {
    margin: 0 0 10px;
    font-weight: 600;
    color: var(--rec-ink);
}
.ivo-rec__channels-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}
.ivo-rec__channels-list a { color: inherit; }
.ivo-rec__channels-key { color: var(--rec-ink-faint); }
.ivo-rec__channels-note { margin: 10px 0 0; font-size: 13px; }

/* ── таблет и по-широко ────────────────────────────────────────────────── */
@media (min-width: 600px) {
    .ivo-rec { padding: 8px 0 32px; }
    .ivo-rec__title { font-size: 26px; }
    .ivo-rec__card { padding: 20px; }
    .ivo-rec__grid { grid-template-columns: 1fr 1fr; gap: 0 14px; }
    .ivo-rec__summary { grid-template-columns: 200px 1fr; }
    .ivo-rec__summary dt { padding-top: 2px; }
    .ivo-rec__row { justify-content: flex-end; }
    .ivo-rec__row .ivo-rec__btn--primary { flex: 0 0 auto; }
    .ivo-rec__item-img { width: 72px; height: 72px; }
}

/* ── по-малко движение, ако потребителят го е поискал ──────────────────── */
@media (prefers-reduced-motion: reduce) {
    .ivo-rec *,
    .ivo-rec *::before,
    .ivo-rec *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}

/* ── Връзка към Общите условия под формата (TERMS-LINK-20260812) ─────────
   Условията за рекламация и другите начини за подаване живеят там, не тук. */
.ivo-rec__terms {
    margin: 18px auto 0;
    max-width: 640px;
    text-align: center;
    font-size: 13px;
    line-height: 1.55;
    color: var(--rec-ink-soft, #475569);
}
.ivo-rec__terms a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.ivo-rec__terms a:hover { color: var(--rec-ink, #0f172a); }
