/*! © 2026 North Point Tech. All rights reserved. Proprietary software — see LICENSE. */
/* Shared by every page: reset, type, buttons, forms, status pills, brand, modal, toast. */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--espresso);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
video {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
::selection {
  background: var(--gold-light);
  color: var(--espresso);
}
:focus-visible {
  outline: 2px solid var(--oxblood);
  outline-offset: 2px;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 400;
  line-height: 1.15;
}
p {
  margin: 0;
}
.hidden,
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -60px;
  z-index: 300;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--ivory);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 12px;
}

/* ---------- page layout ---------- */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .container {
    padding: 0 32px;
  }
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  letter-spacing: 0.01em;
}
.serif {
  font-family: var(--f-serif);
  font-weight: 700;
  letter-spacing: -0.015em;
}
/* A plain ampersand instead of the ornate serif glyph. */
.amp {
  font-family: var(--f-sans);
  font-weight: 500;
  font-style: normal;
}
.label {
  font-size: 13px;
  font-weight: 600;
  color: var(--taupe);
}
.muted {
  color: var(--taupe);
}
.small {
  font-size: 13px;
}
.hint {
  font-size: 13px;
  color: var(--taupe);
}
code {
  font-size: 12px;
  background: var(--paper);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: var(--gold);
  color: var(--ivory);
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s,
    transform 0.2s;
}
.btn:hover:not(:disabled) {
  background: var(--gold-deep);
  color: var(--ivory);
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.4;
}
.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.btn.gold {
  background: var(--gold);
  color: var(--ivory);
}
.btn.gold:hover:not(:disabled) {
  background: var(--gold-deep);
}
.btn.outline {
  background: transparent;
  color: var(--espresso);
  border-color: rgb(var(--gold-rgb) / 0.7);
}
.btn.outline:hover:not(:disabled) {
  background: var(--gold-pale);
}
.btn.on-dark {
  background: transparent;
  color: var(--ivory);
  border-color: rgb(var(--ivory-rgb) / 0.38);
}
.btn.on-dark:hover:not(:disabled) {
  background: rgb(var(--ivory-rgb) / 0.1);
  border-color: var(--gold-light);
}
.btn.ghost {
  background: transparent;
  color: var(--brown);
  border-color: var(--line);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--paper);
  color: var(--espresso);
}
.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: rgb(var(--danger-rgb) / 0.35);
}
.btn.danger:hover:not(:disabled) {
  background: var(--danger-bg);
  color: var(--danger);
}
.btn.sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 14px;
}
.btn.lg {
  min-height: 54px;
  padding: 0 30px;
  font-size: 16px;
}
.btn.block {
  width: 100%;
}

.text-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--espresso);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
}
.text-link:hover {
  color: var(--gold-deep);
}

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  text-align: start;
  color: var(--gold-deep);
  font-weight: 600;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (pointer: coarse), (max-width: 640px) {
  .link-btn {
    min-height: 36px;
  }
}
.link-btn:disabled {
  color: var(--taupe);
  text-decoration: none;
}

/* ---------- forms ---------- */
.field {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.field > label,
.field > .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--brown);
}
.input,
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field textarea {
  min-height: 84px;
  resize: vertical;
}
.input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / 0.18);
}
.field [aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgb(var(--danger-rgb) / 0.15);
}

/* ---------- status: the words carry it, colour only backs them up ---------- */
.pill {
  display: inline;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--brown);
}
.pill.ok {
  color: var(--success);
}
.pill.warn {
  color: var(--warn-ink, var(--warn));
}
.pill.bad {
  color: var(--danger);
}
.pill.info {
  color: var(--info);
}
.pill.neutral {
  color: var(--taupe);
  font-weight: 500;
}

.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
}
/* "Couldn't load" box: one piece, even inside a two-column list, with its buttons under the text. */
.load-failed {
  column-span: all;
  break-inside: avoid;
  flex-direction: column;
  align-items: flex-start;
  max-width: 560px;
}
.load-failed p {
  margin: 0;
}
.alert.error {
  background: var(--danger-bg);
  color: var(--danger);
}
.alert.ok {
  background: var(--success-bg);
  color: var(--success);
}
.alert.warn {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.alert.info {
  background: var(--info-bg);
  color: var(--info);
}

/* ---------- brand ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(var(--gold-rgb) / 0.45);
}
/* The wordmark is set like the logo on the shop's shirts: heavy capitals, a little open. */
.brand-name {
  font-family: var(--f-sans);
  line-height: 1;
  white-space: nowrap;
}
.wordmark {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font-family: "Bebas Neue", "Inter", sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.08em;
  direction: ltr;
}
.wm-mr {
  font-family: "Great Vibes", cursive;
  font-size: 1.15em;
  letter-spacing: 0;
  color: var(--gold);
}
.sidebar .wm-mr,
.site-footer .wm-mr {
  color: var(--gold-light);
}
.brand-name small {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-deep);
}

/* The man in the logo looks left. In left-to-right languages the name sits to his right, so he is
   turned to face it; in Arabic and Kurdish the layout is mirrored and the original already does. */
[dir="ltr"] .brand-logo,
[dir="ltr"] .logo-face {
  transform: scaleX(-1);
}

/* ---------- modal, icon button, toast, spinner ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(var(--ink-rgb) / 0.45);
  backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px); /* the visible height on phones, without the browser bars */
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--ivory);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 26px;
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.modal-head h2 {
  font-family: var(--f-serif);
  font-size: 24px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--brown);
}
.icon-btn:hover {
  background: var(--paper);
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
.icon-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.icon-btn:disabled:hover {
  background: transparent;
}

/* Calendar day heads in Kurdish: full name when there is room, first letter on phones. */
.dow-letter {
  display: none;
}
@media (max-width: 600px) {
  .dow-full {
    display: none;
  }
  .dow-letter {
    display: inline;
    font-size: 13px;
  }
}

/* A short message at the bottom of the screen. Long messages wrap into a plain box, never a pill. */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  padding: 12px 16px;
  border-radius: var(--r);
  background: var(--espresso);
  color: var(--ivory);
  font-size: 14.5px;
  line-height: 1.5;
  text-align: start;
  box-shadow: var(--shadow);
}
.toast.error {
  background: var(--danger);
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
[data-icon] > svg {
  width: 1em;
  height: 1em;
}
.btn [data-icon] > svg {
  width: 16px;
  height: 16px;
}

/* ---------- language menu ---------- */
.lang-select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  color: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23857a6b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 9px center / 12px;
  /* The phone's own font draws "العربية / کوردی", so English pages never download the Arabic web font. */
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Tahoma,
    sans-serif;
}
.lang-select option {
  color: var(--espresso);
  background: #fff;
}
[dir="rtl"] .lang-select {
  padding: 6px 10px 6px 28px;
  background-position: left 9px center;
}
@media (max-width: 420px) {
  .lang-select {
    font-size: 12px;
    padding: 5px 24px 5px 8px;
    background-position: right 7px center;
  }
  [dir="rtl"] .lang-select {
    padding: 5px 8px 5px 24px;
    background-position: left 7px center;
  }
}

/* ---------- Arabic and Kurdish ----------
   Arabic script is joined-up writing: letter-spacing breaks the joins, and there is no upper case. */
[dir="rtl"] body {
  line-height: 1.65;
}
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
  line-height: 1.4;
}
[dir="rtl"] *:not([dir="ltr"]):not([translate="no"]) {
  letter-spacing: 0 !important;
}
[dir="rtl"] * {
  text-transform: none !important;
}
[dir="rtl"] .ico-dir {
  transform: scaleX(-1);
}
[dir="rtl"] input[type="tel"],
[dir="rtl"] input[inputmode="numeric"] {
  direction: ltr;
  text-align: start;
}
/* Numbers stay left-to-right but keep the right-hand alignment of the Arabic/Kurdish text around them. */
/* Time ranges (10:00 – 20:00) always read left to right, in every language. */
[dir="rtl"] .range {
  direction: ltr;
  unicode-bidi: isolate;
}
[dir="rtl"] .ltr {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

/* Small layout helpers used by the scripted views. */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.btn-row.tight {
  gap: 6px;
}
.narrow {
  max-width: 640px;
}
.center {
  text-align: center;
}
.ok-dot {
  color: var(--success);
}
/* Spacing overrides; !important so they win over component margins. */
.mt-6 {
  margin-top: 6px !important;
}
.mt-8 {
  margin-top: 8px !important;
}
.mt-10 {
  margin-top: 10px !important;
}
.mt-12 {
  margin-top: 12px !important;
}
.mt-14 {
  margin-top: 14px !important;
}
.mt-16 {
  margin-top: 16px !important;
}
.mt-18 {
  margin-top: 18px !important;
}
.mt-20 {
  margin-top: 20px !important;
}
.mt-26 {
  margin-top: 26px !important;
}
.mb-10 {
  margin-bottom: 10px !important;
}
.mb-12 {
  margin-bottom: 12px !important;
}
.mb-14 {
  margin-bottom: 14px !important;
}
.mb-20 {
  margin-bottom: 20px !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* A phone number never breaks across two lines. */
b.ltr {
  white-space: nowrap;
}

/* Phones zoom the page in when a box with text under 16px is tapped, so boxes are 16px there. */
@media (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea {
    font-size: 16px !important;
  }
}
/* Links that stand on their own get a finger-sized tap area. */
.text-link {
  display: inline-block;
  padding-block: 9px;
}

/* Small phones: the name, language menu and buttons share one header row without spilling over. */
@media (max-width: 430px) {
  .header-row {
    gap: 8px;
  }
  .brand {
    min-width: 0;
    gap: 8px;
  }
  .brand-logo {
    width: 34px !important;
    height: 34px !important;
  }
  .wordmark {
    font-size: 22px !important;
    gap: 3px;
  }
  .header-actions {
    gap: 6px !important;
    flex-shrink: 0;
  }
  .lang-select {
    padding-inline: 8px 22px;
    min-height: 36px;
  }
}
@media (max-width: 380px) {
  .brand-name small {
    display: none;
  }
  .wordmark {
    font-size: 20px !important;
  }
  .header-actions .btn.sm {
    padding-inline: 10px;
    font-size: 13px;
  }
}
