/* Публичный веб-терминал: собственный слой стилей, без Metronic-бандла */

:root {
    /* палитра выведена из логотипа Xpay: #4A5AB5, градиент #444FA8 -> #839EFF */
    --wt-bg: #eff1f7;
    --wt-surface: #ffffff;
    --wt-surface-2: #f6f7fb;
    --wt-text: #1a1c2b;
    --wt-text-2: #5a5f75;
    --wt-text-3: #8b90a5;
    --wt-border: #e2e5f0;
    --wt-border-2: #c9cedf;
    --wt-accent: #4a5ab5;
    --wt-accent-strong: #3b478f;
    --wt-accent-bg: #e9ecfa;
    --wt-accent-text: #3f4c9e;
    --wt-hero-a: #3d4899;
    --wt-hero-b: #6f8ce5;
    --wt-danger: #dc2626;
    --wt-danger-bg: #fdecec;
    --wt-success: #15803d;
    --wt-success-bg: #e8f7ee;
    --wt-radius: 12px;
    --wt-radius-lg: 16px;
    --wt-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --wt-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body.wt-body {
    background: var(--wt-bg);
    color: var(--wt-text);
    font-family: var(--wt-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.wt-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 16px 16px 48px;
}

/* ===== Header ===== */
.wt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 20px;
}

.wt-logo img {
    display: block;
    max-height: 30px;
    max-width: 160px;
}

.wt-lang {
    display: flex;
    border: 1px solid var(--wt-border);
    border-radius: 999px;
    padding: 2px;
    background: var(--wt-surface);
}

.wt-lang a {
    padding: 5px 13px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wt-text-2);
    text-decoration: none;
}

.wt-lang a.active {
    background: var(--wt-accent);
    color: #fff;
}

/* ===== Alerts ===== */
.wt-alert {
    border-radius: var(--wt-radius);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.wt-alert-danger { background: var(--wt-danger-bg); color: var(--wt-danger); }
.wt-alert-success { background: var(--wt-success-bg); color: var(--wt-success); }
.wt-alert-warning { background: #fdf3e0; color: #92600a; }

/* ===== Sections / cards ===== */
.wt-section { margin-bottom: 22px; }

.wt-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.wt-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.wt-section-link {
    font-size: 13.5px;
    color: var(--wt-accent-text);
    text-decoration: none;
    white-space: nowrap;
}

.wt-back {
    font-size: 13.5px;
    color: var(--wt-text-2);
    text-decoration: none;
}

.wt-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--wt-radius);
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    color: var(--wt-text-2);
    text-decoration: none;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(23, 24, 28, .05);
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}

.wt-back-btn:hover,
.wt-back-btn:focus-visible {
    background: var(--wt-accent-bg);
    border-color: var(--wt-accent);
    color: var(--wt-accent-text);
    box-shadow: 0 4px 14px rgba(74, 90, 181, .16);
}

.wt-back-btn:focus-visible { outline: none; }
.wt-back-btn-sm { width: 36px; height: 36px; border-radius: 10px; }
.wt-back-btn svg { width: 18px; height: 18px; }

.wt-card {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    padding: 16px;
}

/* ===== Search ===== */
.wt-search { position: relative; }

.wt-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    padding: 0 8px 0 16px;
    transition: border-color .15s;
}

.wt-search-box:focus-within { border-color: var(--wt-accent); }

.wt-search-box svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--wt-text-3);
}

.wt-search-box input {
    flex: 1;
    height: 50px;
    border: none;
    outline: none;
    background: transparent;
    color: var(--wt-text);
    font-size: 15px;
    font-family: inherit;
    min-width: 0;
}

.wt-search-box input::placeholder { color: var(--wt-text-3); }

.wt-search-btn {
    height: 38px;
    padding: 0 18px;
    border: none;
    border-radius: var(--wt-radius);
    background: var(--wt-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.wt-search-btn:disabled { opacity: .45; cursor: default; }

.wt-dropdown {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2000;
    margin-top: 6px;
    max-height: 320px;
    overflow: auto;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}

.wt-dropdown-item {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    color: var(--wt-text);
    text-decoration: none;
    border-top: 1px solid var(--wt-border);
}

.wt-dropdown-item:first-child { border-top: none; }
.wt-dropdown-item:hover { background: var(--wt-surface-2); }
.wt-dropdown-empty { padding: 11px 16px; font-size: 13.5px; color: var(--wt-text-3); }

.wt-hint { font-size: 12.5px; color: var(--wt-text-3); margin-top: 6px; }
.wt-hint.error { color: var(--wt-danger); }

/* ===== Tiles (категории) ===== */
.wt-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.wt-tile {
    display: flex;
    align-items: center;
    gap: 11px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    padding: 12px 16px 12px 12px;
    min-height: 66px;
    text-decoration: none;
    color: var(--wt-text);
    transition: border-color .15s, box-shadow .15s;
}

.wt-tile:hover,
.wt-tile:focus-visible {
    border-color: var(--wt-accent);
    box-shadow: 0 4px 14px rgba(74, 90, 181, .12);
}

.wt-tile:focus-visible { outline: none; }
.wt-tile-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; }

/* ===== List rows (услуги, провайдеры) ===== */
.wt-list {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    overflow: hidden;
}

.wt-row-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--wt-text);
    border-top: 1px solid var(--wt-border);
}

.wt-row-item:first-child { border-top: none; }
.wt-row-item:hover { background: var(--wt-surface-2); }
.wt-row-title { flex: 1; font-size: 14.5px; line-height: 1.35; }

.wt-row-chevron {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--wt-text-3);
}

.wt-chip {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--wt-accent-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* картинка занимает весь блок без подложки, закругление совпадает с чипом */
.wt-chip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.wt-chip:has(img) { background: transparent; }

.wt-chip-fallback { font-size: 15px; font-weight: 600; color: var(--wt-accent-text); }
.wt-chip-lg { width: 48px; height: 48px; }

/* ===== Ads ===== */
.wt-banner {
    display: block;
    border-radius: var(--wt-radius-lg);
    overflow: hidden;
    background: transparent;
    text-decoration: none;
    color: var(--wt-text);
    margin-bottom: 10px;
}

.wt-banner img {
    display: block;
    width: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.wt-banner-body {
    display: block;
    margin-top: 8px;
    padding: 10px 14px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
}
.wt-banner-title { font-weight: 600; font-size: 14px; }
.wt-banner-subtitle { font-size: 12.5px; color: var(--wt-text-2); }

/* ===== Service flow ===== */
.wt-service-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.wt-service-title { font-size: 16px; font-weight: 600; line-height: 1.3; }

.wt-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.wt-step {
    font-size: 12px;
    padding: 5px 11px;
    border-radius: 999px;
    color: var(--wt-text-3);
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
}

.wt-step.on {
    background: var(--wt-accent-bg);
    border-color: transparent;
    color: var(--wt-accent-text);
    font-weight: 600;
}

.wt-step.done { color: var(--wt-success); border-color: transparent; background: var(--wt-success-bg); }

/* ===== Form ===== */
.wt-form { display: flex; flex-direction: column; gap: 14px; }

.wt-field label.wt-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.wt-req { color: var(--wt-danger); }

.wt-field input[type="text"],
.wt-field input[type="password"],
.wt-field input[type="number"],
.wt-field select,
.wt-field textarea {
    width: 100%;
    min-height: 48px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border-2);
    border-radius: var(--wt-radius);
    padding: 10px 14px;
    font-size: 16px;
    font-family: inherit;
    color: var(--wt-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.wt-field textarea { resize: vertical; }

.wt-field input:focus,
.wt-field select:focus,
.wt-field textarea:focus {
    border-color: var(--wt-accent);
    box-shadow: 0 0 0 3px var(--wt-accent-bg);
}

.wt-field input::placeholder,
.wt-field textarea::placeholder { color: var(--wt-text-3); }

/* Автозаполнение Chrome красит поле своим цветом (#E8F0FE) — переопределяем
   на наш токен, чтобы input и кастомные селекты были строго одного голубого */
.wt-field input:-webkit-autofill,
.wt-field input:-webkit-autofill:hover,
.wt-field input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--wt-accent-bg) inset;
    box-shadow: 0 0 0 1000px var(--wt-accent-bg) inset;
    -webkit-text-fill-color: var(--wt-text);
    caret-color: var(--wt-text);
}

/* заблокированные/readonly поля (экран подтверждения) — голубые, как заполненные */
.wt-field input[readonly],
.wt-field input[disabled],
.wt-field select[disabled],
.wt-field textarea[readonly],
.wt-field textarea[disabled] {
    background: var(--wt-accent-bg);
    color: var(--wt-text);
    border-color: var(--wt-border-2);
}

/* кастомный селект: без системной стрелки, свой шеврон */
.wt-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235b6069' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 42px;
    cursor: pointer;
}

.wt-error { color: var(--wt-danger); font-size: 13px; margin-top: 6px; }

/* ===== Custom select (список в стиле поиска) ===== */
/* Нативный select остаётся в DOM ради отправки формы, но скрыт.
   JS-энхансер (index.blade.php) строит поверх кастомный триггер + меню. */
.wt-select { position: relative; }

.wt-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    border: 0;
    clip: rect(0 0 0 0);
    overflow: hidden;
}

.wt-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border-2);
    border-radius: var(--wt-radius);
    font-size: 16px;
    font-family: inherit;
    color: var(--wt-text);
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.wt-select-trigger:focus-visible {
    outline: none;
    border-color: var(--wt-accent);
    box-shadow: 0 0 0 3px var(--wt-accent-bg);
}

.wt-select.open .wt-select-trigger {
    border-color: var(--wt-accent);
    box-shadow: 0 0 0 3px var(--wt-accent-bg);
}

.wt-select-trigger.placeholder { color: var(--wt-text-3); }

/* выбрано значение — поле подсвечивается голубым, как заполненные поля */
.wt-select-trigger:not(.placeholder):not([disabled]) {
    background: var(--wt-accent-bg);
}

.wt-select-trigger[disabled] {
    background: var(--wt-accent-bg);
    color: var(--wt-text);
    border-color: var(--wt-border-2);
    cursor: default;
}

.wt-select-caret {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--wt-text-2);
    transition: transform .15s;
}

.wt-select.open .wt-select-caret { transform: rotate(180deg); }

.wt-select-value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wt-select-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 2000;
    margin-top: 6px;
    max-height: 320px;
    overflow-y: auto;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .10);
}

.wt-select.open .wt-select-menu { display: block; }

.wt-select-option {
    padding: 12px 16px;
    font-size: 15px;
    line-height: 1.35;
    color: var(--wt-text);
    cursor: pointer;
    border-top: 1px solid var(--wt-border);
}

.wt-select-option:first-child { border-top: none; }

.wt-select-option.placeholder { color: var(--wt-text-3); }

.wt-select-option:hover,
.wt-select-option.active {
    background: var(--wt-surface-2);
}

.wt-select-option.selected {
    background: var(--wt-accent-bg);
    color: var(--wt-accent-text);
    font-weight: 600;
}

.wt-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
}

.wt-checks .wt-check {
    align-items: center;
    min-height: 44px;
    padding: 11px 12px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    transition: background .15s, border-color .15s, box-shadow .15s;
}

.wt-checks .wt-check:hover {
    border-color: var(--wt-border-2);
    box-shadow: 0 3px 10px rgba(23, 24, 28, .05);
}

.wt-checks .wt-check:has(input:checked) {
    background: var(--wt-accent-bg);
    border-color: var(--wt-accent);
}

/* кастомные чекбоксы и радио вместо системных */
.wt-check input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 1px 0 0;
    flex-shrink: 0;
    background: var(--wt-surface);
    border: 1.5px solid var(--wt-border-2);
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}

.wt-check input[type="radio"] { border-radius: 50%; }

.wt-check input:hover { border-color: var(--wt-accent); }

.wt-check input:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--wt-accent-bg);
}

.wt-check input[type="checkbox"]:checked {
    background: var(--wt-accent);
    border-color: var(--wt-accent);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 13px;
}

.wt-check input[type="radio"]:checked {
    border: 6px solid var(--wt-accent);
    background: #ffffff;
}

.wt-check input[disabled] { opacity: .5; cursor: default; }
.wt-check:has(input[disabled]) { cursor: default; opacity: .65; }

.wt-checks { display: flex; flex-direction: column; gap: 12px; }

/* ===== Info / receipt ===== */
.wt-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-left: 3px solid var(--wt-accent);
    border-radius: var(--wt-radius);
    padding: 12px 16px;
    font-size: 14px;
}

.wt-info-icon {
    width: 18px;
    height: 18px;
    color: var(--wt-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.wt-info-icon svg { width: 100%; height: 100%; }

.wt-info-text { white-space: pre-line; min-width: 0; }

.wt-receipt {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    padding: 12px 16px;
}
.wt-receipt-ticket {
    width: 302px;
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border: 1px dashed #d9d9d9;
    border-radius: 0;
    padding: 12px;
    color: #111111;
    font-family: var(--wt-mono);
    font-size: 12px;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
}

.wt-receipt-ticket .wt-receipt-head {
    text-align: center;
    text-transform: uppercase;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .5px;
    margin: 0;
}

.wt-receipt-ticket .wt-receipt-head::after {
    content: "";
    display: block;
    border-top: 1px dashed #999999;
    margin: 10px 0;
}

.wt-receipt-ticket-success .wt-receipt-head::after {
    display: none;
}

.wt-receipt-ticket .wt-receipt-sub {
    text-align: center;
    font-size: 12px;
    opacity: .85;
    margin-top: 2px;
}

.wt-receipt-ticket .wt-receipt-divider {
    border-top: 1px dashed #999999;
    margin: 10px 0;
}

.wt-receipt-ticket .wt-receipt-line {
    color: #111111;
    font-size: 12px;
    margin: 4px 0;
    word-break: break-word;
}

.wt-receipt-ticket .wt-receipt-line-center {
    text-align: center;
}

.wt-receipt-ticket .wt-receipt-kv {
    gap: 8px;
    color: #111111;
    font-size: 12px;
    margin: 4px 0;
}

.wt-receipt-ticket .wt-receipt-kv > span:first-child {
    min-width: 90px;
    opacity: .85;
}

.wt-receipt-ticket .wt-receipt-kv .v {
    flex: 1;
    color: #111111;
    font-weight: 500;
    text-align: right;
    white-space: normal;
    word-break: break-word;
}

.wt-receipt-ticket .wt-receipt-kv.total {
    border-top: none;
    margin-top: 4px;
    padding-top: 0;
}

.wt-receipt-ticket .wt-receipt-kv.total,
.wt-receipt-ticket .wt-receipt-kv.total .v {
    font-weight: 700;
    font-size: 13px;
}

.wt-receipt-ticket .wt-receipt-footer {
    margin-top: 6px;
    text-align: center;
    font-weight: 600;
}

.wt-receipt-ticket-success + .wt-btn-primary {
    margin-top: 14px;
}

.wt-receipt-head {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.wt-receipt-line {
    font-size: 13.5px;
    color: var(--wt-text-2);
    margin: 2px 0;
}

.wt-receipt-kv {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13.5px;
    color: var(--wt-text-2);
    margin: 2px 0;
}

.wt-receipt-kv .v { color: var(--wt-text); font-weight: 500; white-space: nowrap; }
.wt-receipt-kv.total { border-top: 1px solid var(--wt-border); margin-top: 8px; padding-top: 8px; }
.wt-receipt-kv.total .v { font-size: 15px; font-weight: 600; }

/* ===== Summary ===== */
.wt-summary {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    padding: 14px 16px;
}

.wt-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 13.5px;
    color: var(--wt-text-2);
    padding: 3px 0;
}

.wt-summary-row.total {
    border-top: 1px solid var(--wt-border);
    margin-top: 8px;
    padding-top: 10px;
    color: var(--wt-text);
    font-size: 14.5px;
    font-weight: 600;
}

.wt-summary-row.total .v { font-size: 20px; }

/* ===== Payment methods ===== */
.wt-pay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.wt-pay-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    padding: 14px;
    cursor: pointer;
    transition: border-color .15s;
}

.wt-pay-card input { position: absolute; opacity: 0; pointer-events: none; }
.wt-pay-card:hover { border-color: var(--wt-border-2); }
.wt-pay-card.selected,
.wt-pay-card:has(input:checked) {
    border: 2px solid var(--wt-accent);
    padding: 13px;
}

.wt-pay-card.disabled { opacity: .5; cursor: default; }

.wt-pay-icon {
    width: 26px;
    height: 26px;
    color: var(--wt-text-2);
    margin-bottom: 8px;
}

.wt-pay-icon svg { width: 100%; height: 100%; }

.wt-pay-card.selected .wt-pay-icon,
.wt-pay-card:has(input:checked) .wt-pay-icon { color: var(--wt-accent); }

.wt-pay-check {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 20px;
    height: 20px;
    color: var(--wt-accent);
    display: none;
}

.wt-pay-check svg { width: 100%; height: 100%; }

.wt-pay-card.selected .wt-pay-check,
.wt-pay-card:has(input:checked) .wt-pay-check { display: block; }

.wt-pay-title { display: block; font-size: 14px; font-weight: 600; }
.wt-pay-note { display: block; font-size: 12.5px; color: var(--wt-text-2); }

/* ===== Buttons ===== */
.wt-btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    border: none;
    border-radius: var(--wt-radius);
    background: var(--wt-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
    padding: 12px 16px;
    transition: background .15s;
}

.wt-btn-primary:hover { background: var(--wt-accent-strong); }
.wt-btn-primary:disabled { opacity: .45; cursor: default; }

.wt-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--wt-text-3);
    margin-top: 10px;
}

.wt-secure-note svg { width: 14px; height: 14px; }

/* ===== QR ===== */
.wt-qr {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    padding: 20px 16px;
    text-align: center;
}

.wt-qr-title { font-size: 15px; font-weight: 600; margin-bottom: 14px; }

.wt-qr-code {
    display: inline-block;
    background: #ffffff;
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    padding: 12px;
    line-height: 0;
}

.wt-qr-code svg { max-width: 100%; height: auto; }

.wt-qr-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--wt-accent-text);
    word-break: break-all;
}

.wt-qr-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    font-size: 13px;
    color: var(--wt-text-2);
}

.wt-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--wt-border-2);
    border-top-color: var(--wt-accent);
    border-radius: 50%;
    animation: wt-spin .8s linear infinite;
    flex-shrink: 0;
}

@keyframes wt-spin { to { transform: rotate(360deg); } }

/* ===== Home hero (главная: поиск как основной сценарий) ===== */
.wt-hero {
    /* overflow не режем: внутри абсолютный дропдаун поиска, он должен выходить за блок */
    position: relative;
    border-radius: 20px;
    background: linear-gradient(132deg, var(--wt-hero-a), var(--wt-hero-b));
    color: #fff;
    padding: 22px 18px 18px;
}

/* декор обрезается собственным слоем, а не overflow самого hero */
.wt-hero-decor {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.wt-hero-sun {
    position: absolute;
    top: -74px;
    right: -60px;
    width: 220px;
    height: 220px;
    opacity: .14;
    pointer-events: none;
}

.wt-hero-title {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -.01em;
}

.wt-hero-sub {
    position: relative;
    font-size: 13px;
    opacity: .85;
    margin: 3px 0 16px;
}

.wt-hero .wt-search { position: relative; }

.wt-hero .wt-search-box {
    border: none;
    box-shadow: 0 6px 18px rgba(20, 24, 60, .18);
}

.wt-hero .wt-hint { color: rgba(255, 255, 255, .8); }
.wt-hero .wt-hint.error { color: #ffd2d9; }

.wt-hero-chips {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.wt-hero-chip {
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 500;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    cursor: pointer;
    transition: background .15s;
}

.wt-hero-chip:hover,
.wt-hero-chip:focus-visible { background: rgba(255, 255, 255, .26); }

/* ===== Цветовой код категорий (детерминирован названием) ===== */
.wt-hue-0 { background: #ddf2ef; color: #1e6e63; }
.wt-hue-1 { background: #fbeedb; color: #8a5a12; }
.wt-hue-2 { background: #fbe3e7; color: #a03349; }
.wt-hue-3 { background: #dfedfa; color: #235b8e; }
.wt-hue-4 { background: #ece6f9; color: #5b3ea6; }
.wt-hue-5 { background: #e2f3e0; color: #2f7233; }

.wt-chip[class*="wt-hue-"] .wt-chip-fallback { color: inherit; }

/* ===== Ads carousel ===== */
.wt-ads {
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius-lg);
    overflow: hidden;
}

.wt-ads-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.wt-ads-track::-webkit-scrollbar { display: none; }

.wt-ads-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: block;
    text-decoration: none;
    line-height: 0;
}

.wt-ads-slide img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
}

.wt-ads-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 11px;
    color: var(--wt-text-3);
}

.wt-ads-dots { display: flex; gap: 5px; }

.wt-ads-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--wt-border-2);
    transition: width .2s, background .2s;
}

.wt-ads-dots i.on {
    background: var(--wt-accent);
    width: 16px;
    border-radius: 4px;
}

/* ===== Футер доверия (главная) ===== */
.wt-footer {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.wt-footer .wt-secure-note { margin-top: 0; }

.wt-receipt-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border);
    border-radius: var(--wt-radius);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--wt-text);
    cursor: pointer;
    transition: border-color .15s;
}

.wt-receipt-toggle:hover,
.wt-receipt-toggle:focus-visible { border-color: var(--wt-accent); }

.wt-receipt-toggle svg { width: 16px; height: 16px; color: var(--wt-accent); }

.wt-receipt-form { display: flex; gap: 8px; width: 100%; }
.wt-receipt-form[hidden] { display: none; }

.wt-receipt-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 14px;
    background: var(--wt-surface);
    border: 1px solid var(--wt-border-2);
    border-radius: var(--wt-radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--wt-text);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.wt-receipt-form input:focus {
    border-color: var(--wt-accent);
    box-shadow: 0 0 0 3px var(--wt-accent-bg);
}

.wt-receipt-form button {
    height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: var(--wt-radius);
    background: var(--wt-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
}

.wt-receipt-form button:hover { background: var(--wt-accent-strong); }

/* ===== Misc ===== */
.wt-debug {
    font-size: 11.5px;
    color: var(--wt-text-3);
    font-family: var(--wt-mono);
    margin-top: 6px;
    word-break: break-all;
}

.wt-muted { color: var(--wt-text-3); font-size: 13px; }
