/* ==========================================================================
   0FEE — token security scanner (/scan)
   Builds on assets/app.css; only what this page adds lives here.
   Written with logical properties so the Arabic (RTL) view mirrors cleanly.
   ========================================================================== */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.scan-main { padding: 34px 0 0; }

/* head --------------------------------------------------------------------- */
.scan-head { max-width: 780px; margin: 0 auto; text-align: center; }
.scan-head h1 {
  font-size: 42px; line-height: 1.08; margin: 16px 0 0;
  letter-spacing: -0.035em; font-weight: 800;
}
.scan-chips {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center;
  gap: 8px 10px; margin: 18px 0 0; padding: 0;
}
.scan-chips li {
  font-size: 12px; font-weight: 600; color: #c6f7e3;
  border: 1px solid rgba(0, 224, 138, 0.3); background: rgba(0, 224, 138, 0.07);
  border-radius: 999px; padding: 5px 11px;
}
.scan-chips li + li { color: var(--muted); border-color: var(--line); background: var(--card); }

/* form --------------------------------------------------------------------- */
.scan-card {
  max-width: 880px; margin: 26px auto 0; padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025));
  border: 1px solid var(--line-strong); border-radius: 22px;
  box-shadow: var(--shadow);
}
.scan-fields {
  display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 10px; align-items: end;
}
.scan-field { display: block; min-width: 0; }
.flabel {
  display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 700; margin-bottom: 7px;
}
.sel-wrap { position: relative; display: block; }
.sel-wrap .chain-dot {
  position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%);
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 224, 138, 0.16); pointer-events: none;
}
.sel-wrap::after {
  content: ""; position: absolute; inset-inline-end: 14px; top: 50%; width: 7px; height: 7px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
.scan-select, .scan-input {
  width: 100%; height: 48px; border-radius: 13px;
  border: 1px solid var(--line-strong); background: rgba(4, 8, 16, 0.55);
  color: var(--text); font-family: inherit; font-size: 16px; /* 16px stops iOS zoom on focus */
  padding: 0 14px; outline: none;
}
.scan-select {
  appearance: none; -webkit-appearance: none;
  padding-inline-start: 32px; padding-inline-end: 32px;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.scan-select:focus, .scan-input:focus { border-color: rgba(0, 224, 138, 0.55); box-shadow: 0 0 0 3px rgba(0, 224, 138, 0.12); }
.scan-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: 0.01em; direction: ltr; text-align: left; }
.scan-input::placeholder { color: #5b6680; }
.scan-btn { height: 48px; padding: 0 22px; border-radius: 13px; white-space: nowrap; }
.scan-btn[disabled] { opacity: 0.65; cursor: progress; }

.scan-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 12px; }
.ex-label { font-size: 12px; color: var(--muted-2); }
.ex-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ex-btn {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600;
}
.ex-btn:hover { color: var(--text); border-color: var(--line-strong); }

.form-msg { margin: 12px 0 0; font-size: 13px; color: var(--muted); min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.is-error { color: #ffb4b4; }
.form-msg.is-ok { color: var(--accent); }
.noscript { max-width: 880px; margin: 16px auto; color: var(--muted); font-size: 14px; }

/* result ------------------------------------------------------------------- */
.scan-result {
  scroll-margin-top: 84px;
  max-width: 980px; margin: 26px auto 0; padding: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line-strong); border-radius: 24px;
}
.res-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px; }
.res-token { display: flex; align-items: center; gap: 12px; min-width: 0; }
.res-avatar {
  flex: 0 0 auto; width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -0.02em;
  background: linear-gradient(140deg, rgba(0, 224, 138, 0.28), rgba(91, 140, 255, 0.28));
  color: #eafff6; border: 1px solid var(--line-strong); overflow: hidden;
}
.res-id { min-width: 0; }
.res-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.res-title b { font-size: 22px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.res-title span { color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.res-sub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.res-actions { display: inline-flex; align-items: center; gap: 6px; }
.res-chain { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; }
.res-sub code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; color: #b8c4d8; overflow-wrap: anywhere; direction: ltr; unicode-bidi: isolate; }
.mini-btn {
  background: var(--card); border: 1px solid var(--line); color: var(--muted);
  border-radius: 7px; padding: 3px 8px; font-size: 11.5px; font-weight: 600; line-height: 1.4;
}
.mini-btn:hover { color: var(--text); border-color: var(--line-strong); }

.verdict { text-align: end; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 210px; }
.verdict-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.01em;
  border-radius: 999px; padding: 8px 15px; border: 1px solid var(--line-strong); background: var(--card);
}
.verdict-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.verdict.is-low .verdict-badge { color: #6ef2b8; border-color: rgba(0, 224, 138, 0.5); background: rgba(0, 224, 138, 0.1); }
.verdict.is-caution .verdict-badge { color: #ffcb7a; border-color: rgba(255, 181, 69, 0.5); background: rgba(255, 181, 69, 0.1); }
.verdict.is-high .verdict-badge { color: #ff9b9b; border-color: rgba(255, 107, 107, 0.55); background: rgba(255, 107, 107, 0.11); }
.verdict.is-unknown .verdict-badge { color: var(--muted); }
.verdict-sub { font-size: 12.5px; color: var(--muted); max-width: 330px; line-height: 1.45; text-align: end; }
.verdict-count { font-size: 11.5px; color: var(--muted-2); }

.res-market {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px;
  margin: 18px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.res-market:empty { display: none; }
.mk { background: rgba(9, 13, 23, 0.92); padding: 11px 13px; min-width: 0; }
.mk small { display: block; font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.mk b { display: block; margin-top: 4px; font-size: 15.5px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mk span { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted-2); }

.res-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; align-items: start; }
.res-block { background: rgba(255, 255, 255, 0.028); border: 1px solid var(--line); border-radius: 16px; padding: 14px 15px 6px; min-width: 0; }
.res-block h2 { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 6px; }
.rows { display: grid; }
.row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.055); font-size: 13.5px;
}
.row:last-child { border-bottom: 0; }
.row .k { color: var(--muted); min-width: 0; }
.row .v { display: flex; align-items: center; gap: 8px; text-align: end; font-weight: 650; color: #e4ebf6; font-variant-numeric: tabular-nums; }
.pill {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 800; letter-spacing: 0.03em;
  border-radius: 6px; padding: 2px 6px; border: 1px solid var(--line); color: var(--muted);
}
.pill.st-pass { color: #6ef2b8; border-color: rgba(0, 224, 138, 0.42); background: rgba(0, 224, 138, 0.09); }
.pill.st-warn { color: #ffcb7a; border-color: rgba(255, 181, 69, 0.45); background: rgba(255, 181, 69, 0.1); }
.pill.st-fail { color: #ff9b9b; border-color: rgba(255, 107, 107, 0.5); background: rgba(255, 107, 107, 0.11); }
.pill.st-info { color: #9fb6d9; border-color: rgba(91, 140, 255, 0.42); background: rgba(91, 140, 255, 0.1); }

.res-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 18px; }
.res-cta .btn { padding: 13px 22px; }
.fee-tag { font-size: 12.5px; color: var(--accent); font-weight: 700; }
.res-stamp { margin: 14px 0 0; font-size: 11.5px; color: var(--muted-2); }
.res-disclaimer { margin: 6px 0 0; font-size: 11.5px; color: #5f6b83; max-width: 820px; }

/* method + faq -------------------------------------------------------------- */
.scan-sec { max-width: 880px; margin: 54px auto 0; }
.sec-lede { color: var(--muted); font-size: 14.5px; margin: 10px 0 0; max-width: 760px; }
.method { margin: 16px 0 0; padding-inline-start: 18px; display: grid; gap: 9px; max-width: 800px; }
.method li { color: var(--muted); font-size: 13.8px; line-height: 1.6; }
.method b { color: #dfe7f3; }
.method-sub { font-size: 15px; margin: 24px 0 0; }
.scan-sec .faq { margin-top: 6px; }
.scan-cta { text-align: center; padding: 26px 18px; border: 1px solid rgba(0, 224, 138, 0.28); border-radius: 20px; background: rgba(0, 224, 138, 0.05); }
.cta-line { color: var(--muted); margin: 0 0 14px; font-size: 14.5px; }

/* header language selector -------------------------------------------------- */
.lang-wrap { display: inline-flex; }
.hdr-swap { padding: 9px 14px; font-size: 13px; }
.lang-sel {
  appearance: none; -webkit-appearance: none; background: var(--card); color: var(--text);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; font-size: 12px;
  font-weight: 700; font-family: inherit; cursor: pointer; max-width: 96px;
}
.lang-sel:focus { border-color: rgba(0, 224, 138, 0.5); outline: none; }

/* responsive ---------------------------------------------------------------- */
@media (max-width: 860px) {
  .res-grid { grid-template-columns: minmax(0, 1fr); }
  .res-market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .res-head { grid-template-columns: minmax(0, 1fr); }
  .scan-main { padding-top: 22px; }
  .scan-head h1 { font-size: 30px; }
  .scan-card { padding: 14px; border-radius: 18px; }
  .scan-fields { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .scan-btn { width: 100%; }
  .scan-result { padding: 15px; border-radius: 20px; }
  .res-title b { font-size: 19px; }
  .verdict { text-align: start; align-items: flex-start; min-width: 0; width: 100%; }
  .verdict-sub { text-align: start; max-width: none; }
  .res-market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .row { font-size: 13px; gap: 8px; }
  .row .v { flex-wrap: wrap; justify-content: flex-end; }
  .scan-sec { margin-top: 40px; }
}
@media (max-width: 400px) {
  .scan-head h1 { font-size: 27px; }
  .res-sub code { font-size: 11px; }
  .mk b { font-size: 14px; }
}
