/* wwwroot/css/trust.css — NEW FILE — sign-up in steps, the 6-box code input, the password strength meter, the forgot-password
   pages, and the welcome questions (how did you find us / business / apps). Uses the public site colours (--p-*) on the public
   pages and the app theme (--surface, --brand …) inside the system. */

/* ── steps of the sign-up form ── */
.tr-steps { display: flex; gap: 8px; margin: 0 0 22px; }
.tr-steps span { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: .78rem; font-weight: 700; color: var(--p-text3); }
.tr-steps span::before { content: ""; height: 5px; border-radius: 99px; background: var(--p-line); }
.tr-steps span.on, .tr-steps span.done { color: var(--p-ink); }
.tr-steps span.on::before { background: var(--p-brand); }
.tr-steps span.done::before { background: var(--p-good); }
.tr-step[hidden] { display: none !important; }
.tr-nav { display: flex; gap: 10px; margin-top: 8px; }
.tr-nav .p-btn { flex: 1; }
.tr-privacy { display: flex; gap: 10px; align-items: flex-start; background: var(--p-bg2); border-radius: 12px; padding: 12px 14px; font-size: .84rem; color: var(--p-text2); margin: 4px 0 16px; }
.tr-privacy i { color: var(--p-good); font-size: 1.1rem; margin-top: 1px; }
.tr-privacy a { font-weight: 700; }
.tr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-chips label { margin: 0; cursor: pointer; position: relative; }
.tr-chips input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.tr-chips span { display: inline-block; border: 1.5px solid var(--p-line); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: .88rem; color: var(--p-text2); background: var(--p-surface); }
.tr-chips input:checked + span { border-color: var(--p-brand); background: var(--p-brand-soft); color: var(--p-brand); }
.tr-chips input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--p-brand) 40%, transparent); }

/* ── password strength ── */
.tr-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
.tr-meter i { height: 4px; border-radius: 99px; background: var(--p-line, #dde3ef); }
.tr-meter[data-s="1"] i:nth-child(-n+1) { background: var(--p-bad, #d6455d); }
.tr-meter[data-s="2"] i:nth-child(-n+2) { background: #f0a63a; }
.tr-meter[data-s="3"] i:nth-child(-n+3) { background: #4caf50; }
.tr-meter[data-s="4"] i { background: var(--p-good, #15a37f); }
.tr-meter-t { font-size: .78rem; color: var(--p-text3, #7a849e); margin-top: 4px; min-height: 1em; }
.tr-rules { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .78rem; color: var(--p-text3, #7a849e); }
.tr-rules li::before { content: "○ "; }
.tr-rules li.ok { color: var(--p-good, #15a37f); }
.tr-rules li.ok::before { content: "● "; }

/* ── the 6-box code ── */
.tr-code { display: grid; grid-template-columns: repeat(6, minmax(0, 52px)); gap: 8px; justify-content: center; direction: ltr; margin: 8px 0 18px; }
.tr-code input { height: 60px; text-align: center; font: 800 1.6rem var(--p-font, system-ui); border-radius: 12px; border: 1.5px solid var(--p-line); background: var(--p-surface); color: var(--p-ink); outline: none; padding: 0; width: 100%; }
.tr-code input:focus { border-color: var(--p-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-brand) 18%, transparent); }
.tr-code.bad input { border-color: var(--p-bad); animation: tr-shake .3s; }
@keyframes tr-shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.tr-where { text-align: center; margin: 0 0 6px; color: var(--p-text2); }
.tr-where b { color: var(--p-ink); direction: ltr; unicode-bidi: isolate; }
.tr-resend { text-align: center; margin-top: 14px; color: var(--p-text3); font-size: .88rem; }
.tr-resend button { border: 0; background: none; color: var(--p-brand); font-weight: 700; cursor: pointer; font: inherit; }
.tr-resend button:disabled { color: var(--p-text3); cursor: default; }
.tr-test { border: 1.5px dashed #f0a63a; background: #fdf1dc; color: #7a4d06; border-radius: 12px; padding: 10px 14px; margin: 0 0 16px; font-size: .85rem; }
.tr-test b { font-size: 1.15rem; letter-spacing: 4px; direction: ltr; unicode-bidi: isolate; }
.tr-safe { display: grid; gap: 10px; margin: 18px 0 0; }
.tr-safe div { display: flex; gap: 10px; align-items: flex-start; font-size: .86rem; color: var(--p-text2); }
.tr-safe i { color: var(--p-good); }
.tr-ways { display: grid; gap: 10px; margin: 0 0 16px; }
.tr-ways label { display: flex; gap: 12px; align-items: center; border: 1.5px solid var(--p-line); border-radius: 12px; padding: 12px 14px; cursor: pointer; margin: 0; }
.tr-ways label:has(input:checked) { border-color: var(--p-brand); background: var(--p-brand-soft); }
.tr-ways input { accent-color: var(--p-brand); width: 18px; height: 18px; }
.tr-ways i { font-size: 1.3rem; color: var(--p-brand); }
.tr-ways small { display: block; color: var(--p-text3); }

/* ── welcome questions (inside the app) ── */
.tq-q { margin: 0 0 1.6rem; }
.tq-q > h3 { font-size: 1rem; font-weight: 800; margin: 0 0 .25rem; }
.tq-q > p { color: var(--text3); font-size: .88rem; margin: 0 0 .8rem; }
.tq-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tq-cards.apps { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.tq-cards label { position: relative; margin: 0; cursor: pointer; }
.tq-cards input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.tq-cards .c { display: flex; gap: 10px; align-items: center; height: 100%; padding: .75rem .85rem; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); font-weight: 700; font-size: .9rem; color: var(--text); transition: border-color .12s, background .12s; }
.tq-cards .c i { font-size: 1.3rem; color: var(--brand); flex: none; }
.tq-cards .c small { display: block; font-weight: 500; font-size: .76rem; color: var(--text3); line-height: 1.3; }
.tq-cards input:checked + .c { border-color: var(--brand); background: var(--brand-dim); box-shadow: inset 0 0 0 1px var(--brand); }
.tq-cards input:checked + .c::after { content: "\F26E"; font-family: bootstrap-icons; margin-inline-start: auto; color: var(--brand); font-size: 1.2rem; }
.tq-cards input:focus-visible + .c { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.tq-cards label.rec .c { border-style: dashed; }
.tq-tag { display: inline-block; font-size: .68rem; font-weight: 800; padding: 1px 7px; border-radius: 99px; background: var(--brand-dim); color: var(--brand); margin-inline-start: 4px; vertical-align: 1px; }
.tq-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tq-trust { display: flex; gap: 14px; align-items: flex-start; border: 1px dashed var(--border); border-radius: 14px; padding: 1rem 1.1rem; margin-top: 1.2rem; }
.tq-trust > i { font-size: 1.6rem; color: var(--success); }
.tq-trust p { margin: .2rem 0 .6rem; color: var(--text3); font-size: .86rem; }
.tq-badge { display: inline-flex; gap: 6px; align-items: center; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.tq-badge.ok { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.tq-badge.wait { background: color-mix(in srgb, var(--warning) 18%, transparent); color: var(--warning); }
.tq-badge.bad { background: var(--danger-dim); color: var(--danger); }
.tq-next { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 1.2rem 0; text-align: start; }
.tq-next a { display: flex; gap: 10px; align-items: center; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 14px; color: var(--text); text-decoration: none; font-weight: 600; }
.tq-next a:hover { border-color: var(--brand); background: var(--brand-dim); }
.tq-next a i { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-dim); color: var(--brand); flex: none; font-size: 1.1rem; }
.tq-next a small { display: block; font-weight: 500; color: var(--text3); font-size: .78rem; }

/* ── finding apps: categories, search, related ── */
.ac-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 1rem; }
.ac-search { position: relative; flex: 1 1 240px; max-width: 380px; }
.ac-search i { position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }
.ac-search input { width: 100%; min-height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 0 12px 0 36px; font: inherit; }
[dir=rtl] .ac-search input { padding: 0 36px 0 12px; }
.ac-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-dim); }
.ac-cats { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.ac-cats button { flex: none; display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text2); border-radius: 99px; padding: 6px 12px; font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ac-cats button:hover { border-color: var(--brand); color: var(--brand); }
.ac-cats button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.ac-cats button b { font-variant-numeric: tabular-nums; opacity: .75; font-weight: 700; }
.ac-rel { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; font-size: .74rem; color: var(--text3); }
.ac-rel a, .ac-rel span.ac-r { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--border); border-radius: 99px; padding: 1px 8px; color: var(--text2); text-decoration: none; background: var(--bg2); font-weight: 600; }
.ac-rel a:hover { border-color: var(--brand); color: var(--brand); }
.ac-empty { color: var(--text3); text-align: center; padding: 2rem 0; }
.ac-flash { animation: ac-flash 1.2s ease-out; }
@keyframes ac-flash { 0% { box-shadow: 0 0 0 4px var(--brand); } 100% { box-shadow: 0 0 0 0 transparent; } }

@media (max-width: 640px) {
    .tr-code { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
    .tr-code input { height: 54px; font-size: 1.4rem; }
    .tq-row { grid-template-columns: minmax(0, 1fr); }
    .tq-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tq-cards.apps { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .tr-code.bad input, .ac-flash { animation: none; } }
