/* Mom's Publisher — shared look. Big text, big buttons, plain words. */
@import url('/static/fonts/fonts.css');

:root {
  --ink: #1f2430;
  --ink-soft: #4b5468;
  --line: #c8cedb;
  --line-soft: #e3e7ef;
  --paper: #ffffff;
  --chrome: #eef1f7;
  --chrome-2: #e2e7f1;
  --workspace: #8b93a5;
  --accent: #1d6fb8;
  --accent-dark: #16568f;
  --accent-soft: #d6e7f6;
  --good: #1f8a4c;
  --warn: #b1560f;
  --bad: #b3202c;
  --radius: 8px;
  --shadow: 0 2px 6px rgba(20, 28, 45, .18);
  --ui-font: 'Carlito', 'Liberation Sans', system-ui, sans-serif;
  --display-font: 'Playfair Display', 'Liberation Serif', Georgia, serif;
}

* { box-sizing: border-box; }

/* A hidden thing stays hidden even when a later rule sets display. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: var(--ui-font);
  font-size: 18px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--chrome);
}

body { font-size: 18px; }

p, li, td, th, label, input, select, textarea, button, a { font-size: 18px; }

h1 { font-size: 40px; margin: 0 0 12px; }
h2 { font-size: 30px; margin: 24px 0 10px; }
h3 { font-size: 23px; margin: 18px 0 8px; }

a { color: var(--accent-dark); }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  font-family: var(--ui-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent-dark);
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-danger { color: #fff; background: var(--bad); border-color: #8c1a23; }
.btn-danger:hover { background: #8c1a23; }
.btn-big { min-height: 60px; font-size: 22px; padding: 12px 28px; }

/* ---------------------------------------------------------------- inputs */
input[type=text], input[type=number], input[type=password], select, textarea {
  min-height: 44px;
  padding: 8px 12px;
  font-family: var(--ui-font);
  font-size: 18px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
input[type=color] {
  width: 52px;
  height: 44px;
  padding: 2px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
}
label { font-weight: 600; }

/* ---------------------------------------------------------------- dialog */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(24, 30, 44, .55);
  z-index: 900;
}
.overlay[hidden] { display: none; }
.dialog {
  width: min(560px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 24px 26px;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 14px 40px rgba(10, 16, 30, .35);
}
.dialog.dialog-wide { width: min(900px, 100%); }
.dialog h2 { margin-top: 0; font-size: 28px; }
.dialog .dialog-text { font-size: 19px; }
.dialog-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 22px;
}

/* ---------------------------------------------------------------- toast */
#toasts {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateX(-50%);
}
.toast {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  padding: 14px 20px;
  font-size: 19px;
  color: #fff;
  background: #2b3242;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.toast.toast-bad { background: var(--bad); }
.toast.toast-good { background: var(--good); }
.toast button {
  min-height: 40px;
  padding: 6px 14px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, .18);
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 8px;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon { width: 26px; height: 26px; flex: none; display: block; }
