/* Values and sizing follow styles/globals.css and the existing Troddit UI. */
:root {
  color-scheme: light;
  --text: #111827;
  --troddit-accent: #60a5fa;
  --base: #e5e7eb;
  --background2: #ffffff;
  --post: #f8fafc;
  --highlight: #f3f4f6;
  --border: #d4d4d8;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

/* The app defaults to the system theme when no preference has been saved. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --text: #e7e5e4;
    --troddit-accent: #2c8ebb;
    --base: #000000;
    --background2: #1a1a1b;
    --post: #1a1a1b;
    --highlight: #262626;
    --border: #3f3f46;
  }
}

[data-theme="dark"] {
  color-scheme: dark;
  --text: #e7e5e4;
  --troddit-accent: #2c8ebb;
  --base: #000000;
  --background2: #1a1a1b;
  --post: #1a1a1b;
  --highlight: #262626;
  --border: #3f3f46;
}

[data-theme="abyss"] {
  color-scheme: dark;
  --text: #d1d1d0;
  --troddit-accent: #007acc;
  --base: #000c19;
  --background2: #060623;
  --post: #060623;
  --highlight: #122039;
  --border: #002953;
}

[data-theme="black"] {
  color-scheme: dark;
  --text: #ffffff;
  --troddit-accent: #04d2f7;
  --base: #000000;
  --background2: #000000;
  --post: #000000;
  --highlight: #111111;
  --border: #000000;
}

[data-theme="dracula"] {
  color-scheme: dark;
  --text: #f8f8f2;
  --troddit-accent: #ff79c6;
  --base: #21222d;
  --background2: #21222d;
  --post: #282a37;
  --highlight: #313342;
  --border: #3a3c48;
}

[data-theme="nord"] {
  color-scheme: dark;
  --text: #eceff4;
  --troddit-accent: #8fbcbb;
  --base: #2e3440;
  --background2: #434c5e;
  --post: #434c5e;
  --highlight: #3b4252;
  --border: #54617b;
}

[data-theme="ocean"] {
  color-scheme: dark;
  --text: #cccccc;
  --troddit-accent: #65cdc4;
  --base: #0f111b;
  --background2: #0f111b;
  --post: #0f111b;
  --highlight: #0c0e16;
  --border: #212634;
}

[data-theme="palenight"] {
  color-scheme: dark;
  --text: #b6c0cf;
  --troddit-accent: #8555c8;
  --base: #23283a;
  --background2: #24293b;
  --post: #282d3f;
  --highlight: #202433;
  --border: #2d3244;
}

*, ::before, ::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--base); }

.header {
  position: relative;
  z-index: 1;
  height: 48px;
  display: flex;
  align-items: center;
  background: var(--background2);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
}

.wordmark { margin-left: 8px; font-size: 24px; font-weight: 400; line-height: 32px; }

.main {
  min-height: calc(100vh - 48px);
  min-height: calc(100svh - 48px);
  display: grid;
  place-items: center;
  padding: 32px 16px 80px;
}

.notice {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--post);
}

.notice-content { padding: 24px; }
h1 { margin: 0 0 16px; font-size: 18px; font-weight: 500; line-height: 24px; }
p { margin: 0; font-size: 14px; line-height: 22px; opacity: .8; }
p + p { margin-top: 16px; }

p a { color: var(--troddit-accent); text-decoration: none; }
p a:hover { text-decoration: underline; }
p a:focus-visible { outline: 2px solid var(--troddit-accent); outline-offset: 2px; border-radius: 2px; }

.notice-actions { display: flex; justify-content: flex-end; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--border); background: var(--background2); }

/* The outlined action uses the same treatment as Feed's error action. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--troddit-accent);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
}

.button:hover { background: var(--highlight); }
.button:focus-visible { outline: 2px solid var(--troddit-accent); outline-offset: 3px; }

.button-primary {
  background: var(--highlight);
  background: color-mix(in srgb, var(--troddit-accent) 18%, transparent);
}
.button-primary:hover { background: color-mix(in srgb, var(--troddit-accent) 30%, transparent); }

@media (max-width: 639px) {
  .main { padding-bottom: 64px; }
  .notice-content { padding: 20px 16px; }
  .notice-actions { flex-direction: column-reverse; padding: 12px 16px; }
  .button { width: 100%; }
}
