/* /deletedata - close or delete an account. Brand colours (--accent, --accent-text) are
   injected per site by index.php; everything else follows the system light/dark mode. */
:root {
  color-scheme: light dark;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #1b2230;
  --muted: #5a6476;
  --border: #e2e6ee;
  --soft: #f6f8fb;
  --ink: #1b2230;
  --ink-hover: #343d4f;
  --ink-text: #ffffff;
  --danger: #c62828;
  --danger-hover: #a91f1f;
  --danger-text: #b3261e;
  --danger-soft: #fdf1f1;
  --danger-border: #efc3c3;
  --ok: #1e7a4c;
  --ok-soft: #e9f6ef;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 20px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --card: #171b22;
    --text: #e6e9ef;
    --muted: #9ba4b4;
    --border: #2a303b;
    --soft: #1d222b;
    --ink: #e6e9ef;
    --ink-hover: #ffffff;
    --ink-text: #10141a;
    --danger: #d13438;
    --danger-hover: #b92b2f;
    --danger-text: #ff8b8e;
    --danger-soft: #2a1618;
    --danger-border: #5c2b2e;
    --ok: #4cc38a;
    --ok-soft: #13251c;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Thai", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.accent-bar { height: 4px; background: var(--accent); }
.wrap { max-width: 640px; margin: 0 auto; padding: 32px 16px 48px; }

/* header */
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); flex: none; }
.brand-name { font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.brand-sub { color: var(--muted); font-size: .9rem; }

h1 { font-size: 1.75rem; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; line-height: 1.3; margin: 0; }
p { margin: 0 0 14px; }
a { color: var(--accent-text); text-underline-offset: 2px; }
.lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 24px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* sections: index.php shows one by id */
#pleaseenteremail, #emailsent, #confirmdeletion, #deleted, #linkexpired, #noaccounts, #temperror { display: none; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card > :last-child { margin-bottom: 0; }

/* option cards */
.option-head { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.option-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.option-icon svg { width: 22px; height: 22px; }
.tag { font-weight: 600; font-size: .95rem; margin: 6px 0 14px; }
.option-close .option-icon { background: var(--ok-soft); color: var(--ok); }
.option-close .tag { color: var(--ok); }
.option-delete { border: 2px solid var(--danger-border); background: linear-gradient(var(--danger-soft), var(--card) 140px); }
.option-delete .option-icon { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger-border); }
.option-delete .tag { color: var(--danger-text); }

ul.points { list-style: none; padding: 0; margin: 0 0 18px; }
ul.points li { position: relative; padding-left: 26px; margin-bottom: 10px; }
ul.points li::before {
  content: ""; position: absolute; left: 4px; top: .62em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .55;
}
.option-close ul.points li::before { background: var(--ok); opacity: 1; }
.option-delete ul.points li::before { background: var(--danger); opacity: 1; }

.accounts {
  background: var(--soft); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin-bottom: 18px; font-size: .95rem;
}
.accounts b { word-break: break-word; }
.acc-label { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.acc-list { list-style: none; margin: 0; padding: 0; }
.acc-list li { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); }
.acc-list li:first-child { border-top: 0; }
.acc-site { flex: 0 0 auto; min-width: 9.5em; color: var(--muted); font-size: .9rem; }
.acc-name { flex: 1 1 auto; min-width: 0; font-size: 1.15rem; font-weight: 700; word-break: break-word; }
.warning { color: var(--danger-text); font-weight: 600; font-size: .9rem; margin: 14px 0 0; }

.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: -4px 0 16px; text-transform: uppercase; letter-spacing: .08em; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* form + buttons */
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type="email"] {
  width: 100%; font: inherit; color: var(--text); background: var(--soft);
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px;
}
input[type="email"]:focus { outline: 2px solid var(--accent-text); outline-offset: 1px; border-color: var(--accent-text); }
.btn {
  display: inline-flex; text-decoration: none; align-items: center; justify-content: center;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 22px; min-height: 48px; border-radius: 10px; border: 0; cursor: pointer;
  width: 100%; transition: background-color .15s ease, opacity .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-ink { background: var(--ink); color: var(--ink-text); }
.btn-ink:hover:not([disabled]) { background: var(--ink-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not([disabled]) { background: var(--danger-hover); }
@media (min-width: 560px) { .btn { width: auto; min-width: 220px; } }

#emailerror {
  display: none; color: var(--danger-text); background: var(--danger-soft);
  border: 1px solid var(--danger-border); border-radius: 10px; padding: 10px 14px; margin: 0 0 14px; font-weight: 600;
}
.callout { border-left: 4px solid var(--ok); background: var(--ok-soft); border-radius: 10px; padding: 14px 16px; }

/* result notices */
.result-icon { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: var(--ok-soft); color: var(--ok); }
.result-icon svg { width: 26px; height: 26px; }
#deletednotice h2 { margin-bottom: 12px; }
#deletednotice h3 { font-size: 1rem; margin: 20px 0 8px; }
#deletednotice ul { padding-left: 20px; margin: 0 0 14px; }
#deletednotice li { margin-bottom: 8px; }
#deletednotice li span { color: var(--muted); }

footer { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 28px; }
footer a { color: var(--muted); }
