/* GuideNord's theme: the colours of core/designsystem Color.kt, Barlow from its fonts. */
@font-face { font-family: Barlow; font-weight: 400; font-display: swap; src: url(fonts/barlow_regular.ttf); }
@font-face { font-family: Barlow; font-weight: 500; font-display: swap; src: url(fonts/barlow_medium.ttf); }
@font-face { font-family: Barlow; font-weight: 600; font-display: swap; src: url(fonts/barlow_semibold.ttf); }
@font-face { font-family: "Barlow Condensed"; font-weight: 600; font-display: swap; src: url(fonts/barlow_condensed_semibold.ttf); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow_condensed_bold.ttf); }

:root {
  color-scheme: light;
  --primary: #E8691E;
  --on-primary: #1A0E05;
  --primary-container: #FDEBDD;
  --secondary: #2F6B3E;
  --secondary-container: #E3EFE4;
  --tertiary: #B4500F;
  --tertiary-container: #FCE6D4;
  --fish: #1F7A6A;
  --background: #F5F2EA;
  --on-background: #17201A;
  --on-surface-variant: #5B6659;
  --error: #B3261E;
  --error-container: #F9DEDA;
  --outline: #DDD7C8;
  --outline-variant: #E6E1D5;
  --card: #FFFFFF;
  --changed: #FBF0CF;
  --header: #1F4229;
  --on-header: #F4F1E8;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --primary: #F27B2B;
    --primary-container: #2A1C11;
    --secondary: #8FD19E;
    --secondary-container: #22382A;
    --tertiary: #F7A06A;
    --tertiary-container: #3A2516;
    --fish: #4FB3A0;
    --background: #0E1611;
    --on-background: #EEF1EA;
    --on-surface-variant: #A9B5AB;
    --error: #F2867A;
    --error-container: #3A1A16;
    --outline: #2C3B30;
    --outline-variant: #24352A;
    --card: #17221A;
    --changed: #3A3115;
    --header: #17221A;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--background);
  color: var(--on-background);
  font: 400 16px/1.5 Barlow, system-ui, sans-serif;
}

h1, h2, h3 { font-family: "Barlow Condensed", Barlow, sans-serif; line-height: 1.2; }
a { color: var(--secondary); }
code { overflow-wrap: anywhere; }
.muted { color: var(--on-surface-variant); font-size: 14px; }
.spacer { flex: 1; }
.logo { display: block; border-radius: 22%; }

header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 16px;
  background: var(--header);
  color: var(--on-header);
}

header h1 { margin: 0; font-size: 24px; font-weight: 700; }
header h1 span { font-weight: 600; opacity: .75; }
header .muted { color: inherit; opacity: .8; }
header button { border-color: currentColor; background: transparent; color: inherit; }

.chip {
  display: inline-block;
  padding: 1px 10px;
  border-radius: 999px;
  background: var(--secondary-container);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.chip.hunt, .chip.warn { background: var(--tertiary-container); color: var(--tertiary); }
.chip.fish { background: var(--secondary-container); color: var(--fish); }
.chip.bad { background: var(--error-container); color: var(--error); }
.chip.plain { background: transparent; box-shadow: inset 0 0 0 1px var(--outline); color: var(--on-surface-variant); }

main { max-width: 900px; margin: 0 auto; padding: 0 16px 96px; }

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 64px auto 0;
  max-width: 420px;
  padding: 32px 24px;
  border: 1px solid var(--outline-variant);
  border-radius: 16px;
  background: var(--card);
  text-align: center;
}

.welcome h2 { margin: 16px 0 0; font-size: 26px; }
.welcome p { margin: 0 0 16px; }

.bar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin: 0 -16px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--outline);
  background: var(--background);
}

@media (max-width: 600px) { .bar { position: static; } }

nav { display: flex; flex-wrap: wrap; gap: 8px; }
nav button { border-radius: 999px; }
nav button[aria-current] { border-color: var(--primary); background: var(--primary-container); font-weight: 600; }
.tools { display: flex; flex: 1 1 320px; gap: 8px; }

input, textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--card);
  color: var(--on-background);
  font: inherit;
}

button {
  min-height: 40px;
  padding: 6px 16px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  background: var(--card);
  color: var(--on-background);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}

button:hover:not(:disabled) { border-color: var(--on-surface-variant); }
button:disabled { opacity: .5; cursor: default; }
button.primary { border-color: var(--primary); background: var(--primary); color: var(--on-primary); font-weight: 600; }
button.danger { border-color: var(--error); background: transparent; color: var(--error); }
:is(button, input, textarea, a):focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.card {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--outline-variant);
  border-radius: 14px;
  background: var(--card);
}

.card.alert { border-color: var(--error); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card h2 { margin: 8px 0 0; font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.section-title { margin: 24px 0 12px; font-size: 18px; color: var(--on-surface-variant); }
.species { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.description { margin: 12px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.note { margin: 12px 0 0; padding: 8px 12px; border-left: 3px solid var(--primary); background: var(--primary-container); white-space: pre-wrap; overflow-wrap: anywhere; }
.changed { background: var(--changed); border-radius: 4px; }
.was { margin: 2px 0 0; color: var(--on-surface-variant); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 12px 0 0; }
dt { color: var(--on-surface-variant); font-size: 14px; }
dd { margin: 0; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.empty { padding: 48px 16px; color: var(--on-surface-variant); text-align: center; }

#message {
  position: fixed;
  z-index: 2;
  right: 16px;
  bottom: 16px;
  left: 16px;
  max-width: 480px;
  margin: 0 auto;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--secondary-container);
  color: var(--secondary);
  font-weight: 500;
  box-shadow: 0 2px 10px rgb(0 0 0 / .25);
}

#message.error { background: var(--error-container); color: var(--error); }

dialog {
  width: min(480px, calc(100vw - 32px));
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: var(--card);
  color: var(--on-background);
}

dialog h2 { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
dialog::backdrop { background: rgb(0 0 0 / .5); }
