/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at https://mozilla.org/MPL/2.0/.
 * Adapted from brave/brave-core@84e90897bda2c9ef179c108ebe735ff066d93cf6
 * components/brave_account/resources/brave_account_row_common.css,
 * brave_account_details.css and brave_account_dialog.css
 * (Copyright (c) 2024-2026 The Brave Authors).
 * Kept: flexible title/description row with trailing action, row dividers,
 * label/value details and centred dialog shell. Changed: plain DOM selectors,
 * system typography, compact responsive spacing; no Chromium, Leo or logo. */
:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1d2330;
  --muted: #5b6474;
  --line: #dfe3ea;
  --accent: #2f5bd3;
  --danger: #b3261e;
  --mock: #fff4d6;
  --on-accent: #ffffff;
  --control: #7a8494;
  color-scheme: light dark;
  font: 15px/1.5 system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171d; --card: #1d222b; --text: #e7eaf0; --muted: #a2abbb; --line: #333a46; --accent: #8fb0ff; --danger: #ff8a80; --mock: #3d3417; --on-accent: #14171d; --control: #7b8494; }
}
* { box-sizing: border-box; }
/* The scroll bar's place is kept, so the page does not move sideways when its content grows past the window. */
html { scrollbar-gutter: stable; }
body { margin: 0; background: var(--bg); color: var(--text); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
.top { padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.brand { font-weight: 600; color: var(--text); text-decoration: none; }
/* The line shown while the account loads sits where the account's first card will: nothing moves when it comes. */
#account-root > p:first-child { margin-top: 0; }
main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 24px 16px; }
.banner { padding: 8px 16px; text-align: center; font-size: 14px; }
.banner-mock { background: var(--mock); }
.banner-error { background: var(--danger); color: var(--on-accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 20px 24px; margin-bottom: 16px; }
h1 { font-size: 22px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 0 0 8px; }
h3, h4 { font-size: 15px; margin: 12px 0 4px; }
.muted { color: var(--muted); }
.error { color: var(--danger); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.rows { list-style: none; padding: 0; margin: 0 0 8px; }
.rows > li { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows > li:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 220px; overflow-wrap: anywhere; }
.badge { color: var(--muted); font-size: 13px; }
.button { display: inline-block; font: inherit; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--control); background: var(--card); color: var(--text); cursor: pointer; text-decoration: none; }
.button.filled, .button.provider { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.plain { border-color: transparent; background: transparent; }
.button.small { padding: 6px 12px; font-size: 14px; }
@media (pointer: coarse) { .button.small { padding: 11px 14px; } }
.button.danger, .button.plain.danger { color: var(--danger); }
.button:disabled { opacity: 0.5; cursor: not-allowed; }
.buttons { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.buttons.stacked { flex-direction: column; }
.buttons.stacked .button { width: 100%; text-align: center; }
.buttons.decision { gap: 24px; margin-top: 16px; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.account-actions .error { flex-basis: 100%; text-align: right; }
.card .error, .dialog .error { margin-top: 8px; }
.request, .result { margin-top: 20px; }
.dialog-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / 0.45); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.dialog-backdrop .dialog { background: var(--card); border-radius: 10px; padding: 24px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; max-width: 520px; width: 100%; }
.inputs { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.label.error { color: var(--danger); }
input[type="text"] { font: inherit; padding: 10px; border-radius: 8px; border: 1px solid var(--control); background: var(--bg); color: var(--text); max-width: 100%; min-width: 0; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
code { font-size: 13px; }

.row { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border: 1px solid var(--line); background: var(--card); border-radius: 8px; margin-bottom: 16px; }
.title-and-description { flex: 1; min-width: 0; }
.title { font-size: 18px; margin: 0; overflow-wrap: anywhere; }
.description { margin: 4px 0 0; color: var(--muted); }
.entry-dialog { max-width: 500px; margin: 32px auto; }
.session-agent, .session-dates, .session-note { display: block; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 540px) {
  main { padding: 16px 12px; }
  .row, .card { padding: 16px; }
  .logged-out-row { align-items: flex-start; flex-wrap: wrap; }
  .facts { grid-template-columns: 1fr; gap: 0; }
  .facts dd { margin-bottom: 8px; }
}
.site-footer { width: 100%; max-width: 760px; margin: 0 auto; padding: 16px; font-size: 13px; color: var(--muted); }
.site-footer a { color: inherit; }
main a { color: var(--accent); }
.warning { font-weight: 600; border-left: 4px solid var(--danger); padding-left: 12px; }
/* With scripts off, what only a script can fill or use is not shown; each page says so in a noscript line. */
@media (scripting: none) { .needs-script { display: none; } }
.card ul { padding-left: 20px; }
.card .rows { padding-left: 0; }
