/* /refunds/: the refund check, the ready-made request and the airline list, in the notebook look
   of jasperhaynes.com ("Field notebook"). Loads after /style.css, so the page's fields, buttons,
   result card, lists and questions start from the notebook rules there; this file only adds the
   refund parts. Colours only through var() tokens (/notebook/tokens.css and /style.css). */

.refund-checked { margin: 0.9rem 0 0; }

.refund-form { display: grid; gap: 24px; max-width: 40rem; }
/* Both set display, so [hidden] (no JavaScript: nothing to use) needs its own rule. */
.refund-form[hidden], .refund-fields[hidden] { display: none; }

/* Read by screen readers, not shown. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* A question: the question in the display face, then the answers. */
.refund-q {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.refund-q legend,
.refund-q-label {
  display: block;
  margin: 0 0 10px;
  padding: 0;
  font: 600 1.1875rem/1.3 var(--display);
  letter-spacing: -0.01em;
  color: var(--ink);
}

/* Each answer is a notebook card with an ink edge, and the whole card is the tap target (44px or
   more). The chosen card gets a doubled ink edge and the pen wash over the card, besides the radio's
   own dot, so the choice never rests on colour alone. */
.refund-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 11px 14px 11px 12px;
  background: var(--card);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  border-radius: 8px;
  line-height: 1.45;
  cursor: pointer;
}
.refund-option:last-child { margin-bottom: 0; }
.refund-option > span { min-width: 0; }
.refund-option:hover,
.refund-option:has(input:checked) { background: linear-gradient(var(--pen-wash), var(--pen-wash)), var(--card); }
.refund-option:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.refund-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
/* The native radio (style.css gives every input the field look; a radio needs none of it). */
.refund-option input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  min-height: 0;
  margin: 0.1rem 0 0;
  padding: 0;
  border: 0;
  accent-color: var(--pen);
}

/* Selects as the notebook fields: ink edge, 6px corners, 18px text (no zoom on iOS), 46px tall. */
.refund-form select,
.refund-field select {
  font: inherit;
  font-size: 1.125rem;
  color: var(--ink);
  background-color: var(--field-bg);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  min-height: 2.9rem;
  width: 100%;
  max-width: 24rem;
}
.refund-field select { max-width: none; }
/* The focus ring of notebook.css rounds to 4px; fields and cards keep their own corners. */
.refund-form select:focus-visible,
.refund-field select:focus-visible,
.refund-message:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.refund-result:focus-visible,
.refund-letter:focus-visible,
#abroad:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.refund-form button { justify-self: start; }

/* The answer: the result card of style.css. The verdict says yes or no in words, after a mark in a
   filled square like the status plate (a tick on --done for yes, a cross on ink for no), so the
   answer never rests on colour alone. */
.refund-result { max-width: 40rem; }
.refund-verdict {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 0.75rem;
  font: 600 1.25rem/1.35 var(--display);
  letter-spacing: -0.01em;
}
.refund-verdict.is-yes { color: var(--done); }
.refund-verdict.is-no { color: var(--ink); }
.refund-mark {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  margin-top: -0.02em;
  border: 1.5px solid var(--ink);
  font-size: 0.95em;
  line-height: 1;
  color: var(--card);
}
.refund-verdict.is-yes .refund-mark { background: var(--done); }
.refund-verdict.is-no .refund-mark { background: var(--ink); }
.refund-result-airline {
  margin: 1.1rem 0 0.35rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--rule);
  font: 600 1.125rem/1.3 var(--display);
  letter-spacing: -0.01em;
}
/* Tap targets of at least 44 px. */
.refund-result a,
.refund-airline a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }

/* Privacy note: the quiet tint panel with a dashed rule (as .unofficial in style.css). */
.refund-private {
  max-width: 40rem;
  padding: 12px 16px 13px;
  background: var(--tint);
  border: 1.5px dashed var(--rule);
  border-radius: 8px;
  font-size: 0.9375rem;
}
.refund-private strong { font-weight: 600; }

/* The request: the fields in a grid, labels as on the tracker's checks, then the message. */
.refund-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 14px 16px;
  max-width: 40rem;
  margin: 1.1rem 0;
}
.refund-field label,
.refund-message-label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.9375rem;
}
.refund-field input { width: 100%; }
.refund-field input::placeholder { color: var(--muted); opacity: 1; }

/* The message: a paper slip with an ink edge. Its height follows the text (refunds.js sets rows),
   so it never needs a scroll of its own. */
.refund-message {
  display: block;
  width: 100%;
  max-width: 40rem;
  font: 400 1rem/1.5 var(--body);
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  resize: vertical;
}
/* The copy button is the notebook's pen pill (style.css); the note next to it is small print. */
.refund-copy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.9rem; }
.refund-copy-row button[hidden] { display: none; }

/* Airline list: one card per airline, the ground stop policy behind a pen rule in the margin. */
.refund-airlines { margin-bottom: 2.5rem; }
.refund-airline-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 12px; }
.refund-airline {
  padding: 16px 18px 17px;
  background: var(--card);
  border: 1.5px solid var(--rule);
  border-radius: 8px;
}
.refund-airline-name { margin: 0 0 2px; font: 600 1.1875rem/1.3 var(--display); letter-spacing: -0.01em; }
.refund-airline p { margin: 0 0 0.4rem; }
.refund-airline p:last-child { margin-bottom: 0; }
.refund-airline-policy { padding: 2px 0 2px 14px; border-left: 3px solid var(--pen); }
.refund-airline-policy strong { font-weight: 600; }

.refunds .rights h2 { margin-bottom: 0.75rem; }
.refunds ol.rights-list { padding-left: 1.4rem; }

@media (max-width: 30rem) {
  .refund-airline { padding: 14px 16px 15px; }
}
