/* ============================================================
 *  feedback-redesign.css — редизайн /feedback
 *  в дизайн-системе страницы заказа (order-redesign.css).
 *  Все правила ограничены классом .fb, чтобы не задеть
 *  Bootstrap, модалки и остальные страницы сайта.
 *  v1
 * ============================================================ */

.fb {
    --fb-green: #2f9e54;
    --fb-line: #e6e6ea;
    --fb-ink: #17171a;
    --fb-mute: #77777f;
    --fb-red: #d9271e;
    --fb-yellow: #ffc107;
    --fb-card-shadow: 0 1px 2px rgba(16,16,24,.04), 0 4px 16px rgba(16,16,24,.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--fb-ink);
    font-size: 15px;
    line-height: 1.5;
}
.fb a { color: var(--fb-red); }

/* ---------- шапка ---------- */
.fb-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 4px 0 14px; flex-wrap: wrap;
}
.fb-head h1 { font-size: 22px; margin: 0; font-weight: 800; color: var(--fb-ink); }
.fb-head__sub { font-size: 13px; color: var(--fb-mute); }

/* ---------- сетка как на странице заказа ---------- */
.fb__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
    gap: 18px;
    align-items: start;
}
.fb__side { position: sticky; top: 16px; }

/* ---------- карточки ---------- */
.fb-card {
    background: #fff;
    border: 0;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: var(--fb-card-shadow);
}
.fb-card__title { font-size: 15px; font-weight: 700; margin: 0 0 12px; color: var(--fb-ink); }
.fb-step {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; border-radius: 50%;
    background: #f0f0f4; color: var(--fb-mute);
    font-size: 12px; font-weight: 700; margin-right: 8px; vertical-align: -3px;
}
.fb-step.is-on { background: var(--fb-green); color: #fff; }

/* ---------- поля ---------- */
.fb .form-group { margin-bottom: 12px; }
.fb .form-group:last-child { margin-bottom: 0; }
.fb label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--fb-ink); }
.fb .label-soft { font-weight: 400; color: var(--fb-mute); }
.fb-hint { font-size: 12.5px; color: var(--fb-mute); margin-top: 4px; line-height: 1.45; }
.fb-hint a { text-decoration: underline; text-decoration-color: #c2c2cb; color: inherit; }
.fb-hint a:hover { color: var(--fb-ink); }

.fb-control {
    display: block; width: 100%;
    padding: 9px 12px;
    font-size: 15px; color: var(--fb-ink);
    background: #fff;
    border: 1px solid #d9d9df; border-radius: 10px;
    outline: none;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.fb-control:focus { border-color: var(--fb-green); box-shadow: 0 0 0 3px rgba(47,158,84,.14); }
.fb textarea.fb-control { resize: vertical; }
.fb select.fb-control {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%2377777f' stroke-width='2' fill='none' stroke-linecap='round'/></svg>");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px;
}
.fb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- файл-дропзона ---------- */
.fb-drop {
    display: flex; align-items: center; gap: 12px;
    border: 1.5px dashed #cfcfd8; border-radius: 12px;
    padding: 12px 14px; cursor: pointer;
    background: #fcfcfd;
    transition: border-color .15s, background .15s;
    margin-bottom: 0;
    font-weight: 400;
}
.fb-drop:hover { border-color: var(--fb-green); background: #f6fbf8; }
.fb-drop__icon {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px;
    background: #f0f0f4; display: flex; align-items: center; justify-content: center;
    font-size: 17px; color: var(--fb-mute);
}
.fb-drop__text { font-size: 13.5px; color: var(--fb-mute); line-height: 1.4; }
.fb-drop__text b { color: var(--fb-ink); font-weight: 600; }
.fb-drop input[type=file] { display: none; }
.fb .file-ok { color: var(--fb-green) !important; }
.fb .file-err { color: #d0364a; font-size: 12.5px; margin-top: 5px; display: none; }

/* ---------- радио-карточки (как способ оплаты) ---------- */
.fb-pays { display: flex; flex-direction: column; gap: 8px; }
.fb-pay {
    display: flex; align-items: center; gap: 10px; margin: 0;
    border: 1px solid #e9e9ef; border-radius: 12px; background: #fcfcfd;
    padding: 11px 13px; font-size: 14px; cursor: pointer; font-weight: 500;
    transition: border-color .15s, background .15s;
}
.fb-pay:hover { border-color: #d5d5dd; }
.fb-pay.on { border-color: var(--fb-green); background: #f4faf6; }
.fb-pay input[type=radio] { accent-color: var(--fb-green); margin: 0; position: static; }
.fb-pay .fa { font-size: 16px; color: var(--fb-mute); width: 20px; text-align: center; }
.fb-pay.on .fa { color: var(--fb-green); }

/* ---------- инфо-блоки ---------- */
.fb-note {
    border-radius: 12px; padding: 12px 14px; font-size: 13.5px;
    line-height: 1.5; margin-bottom: 14px;
}
.fb-note b { font-weight: 700; }
.fb-note ul { margin: 6px 0 0; padding-left: 18px; }
.fb-note li { margin-bottom: 3px; }
.fb-note--info   { background: #f2f7ff; border: 1px solid #dbe7fb; }
.fb-note--warn   { background: #fff8e1; border: 1px solid #f1d179; }
.fb-note--danger { background: #fff0f0; border: 1px solid #f3c1c4; color: #7a1620; }
.fb-note--ok     { background: #f4faf6; border: 1px solid #cdebd8; color: #1d6b3a; }
.fb-note__escape {
    background: none; border: 0; padding: 0; margin-top: 8px;
    color: var(--fb-ink); font-size: 13.5px; font-weight: 600;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
    text-decoration-color: #c2c2cb; font-family: inherit;
}
.fb-note__escape:hover { color: var(--fb-red); }

/* ---------- согласие + кнопка ---------- */
.fb-agree { margin: 12px 0; }
.fb-agree label { display: flex; gap: 9px; align-items: flex-start; margin: 0; font-weight: 400; font-size: 13.5px; color: var(--fb-mute); cursor: pointer; }
.fb-agree input[type=checkbox] { accent-color: var(--fb-green); width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; position: static; }
.fb-agree a { color: inherit; text-decoration: underline; text-decoration-color: #c2c2cb; }

.fb .fb-paybtn {
    display: flex; align-items: center; justify-content: center;
    width: 100%; border: 0; cursor: pointer;
    background: var(--fb-yellow); color: #1a1a1a;
    font-size: 15.5px; font-weight: 700; font-family: inherit;
    padding: 9px 14px; border-radius: 10px; min-height: 42px;
    box-shadow: 0 2px 6px rgba(255,193,7,.35);
    transition: transform .12s, box-shadow .12s, background .12s;
}
.fb .fb-paybtn:hover:not(:disabled) { background: #ffcd38; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,193,7,.45); }
.fb .fb-paybtn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
#submitButton .spin {
    display: inline-block; width: 14px; height: 14px;
    border: 2px solid rgba(0,0,0,.25); border-top-color: #1a1a1a;
    border-radius: 50%; margin-right: 9px; vertical-align: -2px;
    animation: fb-spin .7s linear infinite;
}
@keyframes fb-spin { to { transform: rotate(360deg); } }

.fb-trust {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 12px; color: var(--fb-mute); margin-top: 12px; justify-content: center;
}

/* ---------- капча ---------- */
.fb-captcha-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fb-captcha-box {
    background: #f2f2f6; border-radius: 10px; padding: 9px 14px;
    font-family: "Courier New", monospace; font-size: 19px; font-weight: 700;
    letter-spacing: 4px; color: var(--fb-ink); user-select: none;
    text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25);
    transform: skewX(-6deg);
}
.fb-captcha-row .fb-control { max-width: 150px; }

/* ---------- боковая колонка ---------- */
.fb-side-img { border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.fb-side-img img { width: 100%; display: block; }
.fb .side-quiet { font-size: 12.5px; color: var(--fb-mute); }
.fb .side-quiet b { color: var(--fb-ink); }
.fb .side-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--fb-mute); }
.fb .side-list li { margin-bottom: 4px; }
.fb-slak { font-size: 24px; font-weight: 800; color: var(--fb-ink); }
.fb-badge-num {
    display: inline-block; background: #f4faf6; border: 1px solid #cdebd8;
    color: var(--fb-green); font-weight: 700; font-size: 12px;
    padding: 2px 9px; border-radius: 20px; margin-left: 6px;
}

/* ---------- переключатель тем ---------- */
.fb .topic-form { display: none; }
.fb .topic-form.show { display: block; }

/* ---------- мобильная версия ---------- */
@media (max-width: 860px) {
    .fb__grid { grid-template-columns: minmax(0, 1fr); }
    .fb__side { position: static; }
    .fb-two { grid-template-columns: 1fr; }
}

/* ============================================================
 *  v1.1 — мобильные фиксы поля даты (iOS/Android)
 *
 *  1) iOS Safari принудительно зумит страницу при фокусе на поле
 *     со шрифтом < 16px. После закрытия календаря зум остаётся —
 *     выглядит как «сломанная вёрстка». Лечение: 16px на мобильных.
 *  2) Нативное iOS-оформление date-поля сбрасываем — рисуем сами.
 *  3) Ячейки сетки не распирают колонку (нет гориз. скролла).
 * ============================================================ */
@media (max-width: 860px) {
    .fb .fb-control,
    .fb select.fb-control,
    .fb textarea.fb-control,
    .fb input[type="date"].fb-control,
    .fb .fb-captcha-row input.fb-control {
        font-size: 16px;
    }
}

.fb input[type="date"].fb-control {
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    width: 100%;
    display: block;
    line-height: 1.4;
}

/* iOS центрирует и обрезает выбранную дату — выравниваем влево */
.fb input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
    min-height: 1.5em;
}

/* иконка календаря — к правому краю, без наезда на текст */
.fb input[type="date"]::-webkit-calendar-picker-indicator {
    padding: 0;
    margin-left: auto;
}

/* ячейки сеток не распирают колонки */
.fb .fb-two > .form-group { min-width: 0; }
.fb .fb-two > .form-group .fb-control { min-width: 0; }
.fb .fb__grid > * { min-width: 0; }