/* ScamCheckCY page styles */

:root {
  --bg: #f3f5f9;
  --bg-hero: linear-gradient(160deg, #1d3fb8 0%, #2c5ce6 55%, #4a7bff 100%);
  --card: #ffffff;
  --text: #16191f;
  --muted: #5d6573;
  --faint: #8a93a3;
  --border: #e1e5ec;
  --accent: #2553e0;
  --accent-hover: #1c44bd;
  --accent-soft: #e8eefe;
  --low: #16874a;       --low-soft: #e5f5ec;
  --medium: #b46a00;    --medium-soft: #fdf1de;
  --high: #c9262b;      --high-soft: #fde8e8;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .08);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-hero: linear-gradient(160deg, #13244f 0%, #1a3272 60%, #22408f 100%);
    --card: #181b21;
    --text: #e9ecf1;
    --muted: #a0a8b6;
    --faint: #737c8c;
    --border: #2a2f38;
    --accent: #5b87ff;
    --accent-hover: #7a9dff;
    --accent-soft: #1d2740;
    --low: #4fcf86;       --low-soft: #15291f;
    --medium: #f2a93b;    --medium-soft: #2e2413;
    --high: #ff6b6f;      --high-soft: #331819;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- language */

/* Show only the chosen language (lang.js sets <html lang>); "body" keeps <html> itself from matching. */
html[lang="el"] body [lang="en"],
html:not([lang="el"]) body [lang="el"] { display: none !important; }

.lang-switch {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px 3px 3px 10px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}
.lang-switch svg {
  width: 15px;
  height: 15px;
  margin-right: 4px;
  color: rgba(255, 255, 255, .7);
}
.lang-switch button {
  padding: 5px 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .8);
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-switch button:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.lang-switch button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.lang-switch button[aria-pressed="true"] {
  color: #1d3fb8;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  cursor: default;
}
.lang-switch .short { display: none; }

/* ---------- hero */

.hero {
  position: relative;
  background: var(--bg-hero);
  color: #fff;
  padding: 48px 16px 112px;
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.02em;
  margin: 0;
}
.brand svg { width: 34px; height: 34px; }
.brand .cy {
  margin-left: 4px;
  padding: 1px 7px;
  font-size: .62em;
  vertical-align: .32em;
  color: #fff;
  background: #d57800;  /* copper, as on the Cyprus flag */
  border-radius: 6px;
}
.tagline {
  margin: 8px auto 0;
  max-width: 460px;
  color: rgba(255, 255, 255, .82);
}

main {
  position: relative;  /* above the hero, which is positioned for the language switch */
  max-width: 680px;
  margin: -80px auto 0;
  padding: 0 16px 48px;
}

/* ---------- cards */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

/* ---------- input */

textarea {
  display: block;
  width: 100%;
  min-height: 130px;
  padding: 14px 16px;
  resize: vertical;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
textarea::placeholder { color: var(--faint); }
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 650;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .65; cursor: wait; }
.btn[hidden] { display: none; }  /* .btn's display would otherwise beat the hidden attribute */
.btn-secondary { color: var(--accent); background: var(--accent-soft); }
.btn-secondary:hover { color: #fff; background: var(--accent); }
/* Paste and Picture on the left, check on the right. */
.tools { display: flex; gap: 8px; margin-right: auto; }
.tools .btn { padding-inline: 16px; white-space: nowrap; }
/* A file input inside a button-styled label: the label opens the picker; the input stays reachable by keyboard. */
.picker { position: relative; }
.picker input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.picker:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.picker.disabled { opacity: .65; pointer-events: none; }
.btn svg { flex: none; }
@media (max-width: 520px) {
  /* Phones: both buttons full width, one per line, so neither label has to wrap. */
  .actions { flex-direction: column; align-items: stretch; gap: 8px; }
  .actions .btn { justify-content: center; white-space: nowrap; }
  .tools { flex-wrap: wrap; margin-right: 0; }
  .tools .btn { flex: 1 1 0; }
}
.btn svg { width: 18px; height: 18px; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- verdict */

#result:empty { display: none; }
#result { margin-top: 16px; animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.verdict {
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 6px solid var(--tone);
}
.verdict.low    { --tone: var(--low);    --tone-soft: var(--low-soft); }
.verdict.medium { --tone: var(--medium); --tone-soft: var(--medium-soft); }
.verdict.high   { --tone: var(--high);   --tone-soft: var(--high-soft); }

.verdict-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: var(--tone);
  background: var(--tone-soft);
}
.verdict-icon svg { width: 32px; height: 32px; }

.verdict-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.01em;
  text-transform: none;
  color: var(--tone);
}
.verdict-advice { margin: 4px 0 0; }
.verdict-meta { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- reasons */

h2 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--faint);
}
* + h2 { margin-top: 20px; }

.signals { list-style: none; margin: 0; padding: 0; }
.signals li {
  position: relative;
  padding: 8px 0 8px 22px;
}
.signals li + li { border-top: 1px solid var(--border); }
.signals li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.signals li.sev-high::before   { background: var(--high); }
.signals li.sev-medium::before { background: var(--medium); }
.signals li.sev-low            { color: var(--muted); }
.signals li.sev-low::before    { background: var(--low); }

/* ---------- links */

details.link {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
}
details.link + details.link { margin-top: 8px; }
details.link summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  cursor: pointer;
  list-style: none;
}
details.link summary::-webkit-details-marker { display: none; }
details.link summary::before {
  content: "›";
  color: var(--faint);
  transition: transform .15s;
}
details.link[open] summary::before { transform: rotate(90deg); }
.link-url {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  word-break: break-all;
}
.badge {
  flex: none;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: 999px;
}
.badge.low    { color: var(--low);    background: var(--low-soft); }
.badge.medium { color: var(--medium); background: var(--medium-soft); }
.badge.high   { color: var(--high);   background: var(--high-soft); }
details.link .signals { padding-bottom: 6px; }

/* Sources checked: a quiet, collapsed list under each link's reasons. */
details.sources {
  margin: 0 0 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
details.link details.sources > summary {
  gap: 6px;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.source-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.source-list li {
  display: grid;
  grid-template-columns: 7.5em minmax(0, 11em) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  font-size: 13px;
}
.source-state {
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
}
.source-list .flagged .source-state { color: var(--high);  background: var(--high-soft); }
.source-list .clean   .source-state { color: var(--low);   background: var(--low-soft); }
.source-list .unknown .source-state { color: var(--faint); background: var(--bg); font-weight: 500; }
.source-name { font-weight: 600; }
.source-detail { color: var(--muted); }
.source-note { margin: 10px 0 0; font-size: 12px; color: var(--faint); }

@media (max-width: 520px) {
  .source-list li { grid-template-columns: 7.5em minmax(0, 1fr); }
  .source-detail { grid-column: 2; margin-top: -4px; }
}

.error {
  color: var(--high);
  background: var(--high-soft);
  border-color: transparent;
}

.slow-note { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- report a wrong result */

.report { padding: 14px 20px; box-shadow: none; }
.report-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.report-q { margin-right: auto; font-weight: 600; color: var(--muted); }
.btn-small {
  padding: 6px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.btn-small:hover { color: #fff; background: var(--accent); }
.btn-small:disabled { opacity: .6; cursor: wait; }
.report-include { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.report-include input { margin-top: 3px; }
.report-done { margin: 0; color: var(--muted); }

/* ---------- privacy page */

.hero-small { padding: 28px 16px 96px; }
a.brand { color: inherit; text-decoration: none; }
.prose { line-height: 1.65; }
.prose h1 { margin: 0 0 8px; font-size: 26px; letter-spacing: -.01em; }
.prose h2 {
  margin-top: 24px;
  font-size: 17px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
}
.prose ul { margin: 0; padding-left: 20px; }
.prose li + li { margin-top: 6px; }
.prose p { margin: 8px 0 0; }
.prose code { font-size: .9em; }
.prose a { color: var(--accent); }
.back { margin-top: 24px !important; }

/* ---------- what to do now */

.help { padding: 0; border-left: 6px solid var(--high); }
.help summary {
  padding: 14px 18px;
  font-weight: 700;
  cursor: pointer;
}
.help[open] summary { border-bottom: 1px solid var(--border); }
.help-steps { margin: 0; padding: 14px 18px 4px 38px; }
.help-steps > li { margin-bottom: 12px; }
.help-steps strong { display: block; }
.help-phones { margin: 6px 0 0; padding-left: 18px; }
.help-phones li { margin: 3px 0; }
.help a { color: var(--accent); }
.help a[href^="tel:"] { font-weight: 700; white-space: nowrap; }
.help-warning {
  margin: 0 18px 16px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--medium);
  background: var(--medium-soft);
  border-radius: 10px;
}

/* ---------- footer */

footer {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: var(--faint);
}
footer p { margin: 4px 0; }
footer a { color: inherit; }
/* The install offer: its own centred block, button above a short note, so it never breaks up other text. */
.install { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 16px 0; }
.install[hidden] { display: none; }
.install p { margin: 0; max-width: 34em; }
/* iPhone: steps for Add to Home Screen, opened from a button-like summary. */
.install-ios summary { list-style: none; }
.install-ios summary::-webkit-details-marker { display: none; }
.install-ios ol { margin: 6px 0 2px; padding-left: 1.4em; text-align: left; max-width: 30em; }
.install-ios li { margin: 3px 0; }
.ios-share { width: 16px; height: 16px; vertical-align: -3px; color: var(--accent); }

@media (max-width: 520px) {
  .hero { padding-top: 64px; }  /* room for the language switch above the title */
  .lang-switch { top: 12px; right: 12px; }
  .lang-switch .long { display: none; }
  .lang-switch .short { display: inline; }
  .verdict { flex-direction: column; align-items: flex-start; }
}

/* ---------- scams going around */

.scams h2 { margin-top: 28px; }
.example {
  margin: 10px 0 0;
  padding: 10px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  border-left: 3px solid var(--high);
  border-radius: 0 10px 10px 0;
}
.confirmed-list { list-style: none; padding: 0 !important; }
.confirmed-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.confirmed-list code { overflow-wrap: anywhere; color: var(--high); }
.scam-brand { color: var(--muted); font-size: 14px; }
.confirmed-list time { margin-left: auto; color: var(--faint); font-size: 13px; white-space: nowrap; }
.scam-empty { color: var(--muted); }

/* ---------- owner's visit counts (/stats) */

.stats-page { max-width: 1100px; }
.stats-scroll { overflow-x: auto; margin-top: 12px; }
.stats { border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stats th, .stats td { padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: right; }
.stats th:first-child { text-align: left; }
.stats thead th { color: var(--muted); font-weight: 600; vertical-align: bottom; white-space: normal; min-width: 70px; }
.stats .total { font-weight: 700; background: var(--accent-soft); }

/* ---------- phone numbers in a result */

.phone-facts { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin: 6px 0 8px; font-size: 14px; }
.phone-facts dt { color: var(--muted); }
.phone-facts dd { margin: 0; font-weight: 600; }
.phone-facts dd[title] { text-decoration: underline dotted var(--faint); text-underline-offset: 3px; cursor: help; }
.number-report { margin: 8px 0 10px; }
.number-report fieldset { margin: 0 0 10px; padding: 0; border: 0; }
.number-report legend { margin-bottom: 6px; font-weight: 600; font-size: 14px; }
.report-choice { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.btn-small:disabled { opacity: .5; cursor: not-allowed; }
.phone-tips { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--bg); }
.phone-tips summary { font-weight: 600; cursor: pointer; }
.phone-tips ul { margin: 8px 0 2px; padding-left: 20px; font-size: 14px; }
.phone-tips li + li { margin-top: 6px; }
.badge.unknown { color: var(--muted); background: var(--bg); }
.phone-verdict { margin: 2px 0 4px; font-weight: 600; font-size: 14px; }
.phone-verdict.scam { color: var(--high); }
.phone-verdict.suspicious, .phone-verdict.warning { color: var(--medium); }
.phone-verdict.official { color: var(--low); }
.phone-verdict.unknown { color: var(--muted); }
.look-up { margin: 10px 0 6px; padding-top: 10px; border-top: 1px solid var(--border); }
.look-up-title { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.look-up-links { display: flex; flex-wrap: wrap; gap: 8px; }
.look-up-links a { text-decoration: none; }
.look-up-note { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.install a.btn-small { text-decoration: none; }
