/* Matthew Annable — booking system stylesheet.
 *
 * Restyled to the guitar-lessons design system: cream paper, Newsreader for
 * headings, Manrope for UI, amber for the one action that matters on a screen,
 * green for accents and selected state. Every selector, class name and id the
 * templates and booking.js rely on is unchanged — this file only changes how
 * things look, never what they are.
 *
 * The two typefaces are declared in fonts.css, which base.html links ahead
 * of this file.
 */

:root {
  /* ground and ink */
  --paper: #FBF8F3;
  --paper-2: #F4EFE7;
  --card: #FFFFFF;
  --ink: #2E2A28;
  --ink-soft: #6A625C;
  --ink-faint: #A8A29A;
  --line: #E3DCD1;
  --line-strong: #C9BFB0;

  --accent: #4C6D47;          /* green — accents, selected state, links */
  --accent-soft: #F4EFE7;
  --accent-line: #A8C2A3;
  --amber: #F7A630;           /* the action colour */
  --amber-hover: #FFB544;
  --plum: #6F4B52;

  --ok: #4C6D47;
  --ok-soft: #E8EFE6;
  --warn: #8A5A14;
  --warn-soft: #FDF0DC;
  --danger: #9B3232;
  --danger-soft: #FAEAEA;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow-amber: 0 12px 26px -16px rgba(247, 166, 48, 0.95);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.7 Manrope, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 40px 20px 96px; }
.hidden { display: none !important; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--plum); }

/* ---------------------------------------------------------- typography */
h1 {
  font-family: Newsreader, Georgia, serif; font-weight: 400;
  font-size: clamp(30px, 5vw, 42px); line-height: 1.08;
  letter-spacing: -0.015em; margin: 0 0 6px;
}
h2 {
  font-family: Newsreader, Georgia, serif; font-weight: 500;
  font-size: clamp(21px, 3vw, 26px); line-height: 1.2; margin: 0 0 16px;
}
h3 { font-family: Manrope, system-ui, sans-serif; font-size: 15px; font-weight: 700; margin: 18px 0 8px; }
.sub { color: var(--ink-soft); margin: 0 0 24px; }
.fineprint { color: var(--ink-soft); font-size: 14px; }
.small { font-size: 14px; }
.muted { color: var(--ink-soft); }
.empty { color: var(--ink-soft); font-style: italic; }
code { background: var(--accent-soft); padding: 1px 6px; border-radius: 6px; font-size: 14px; }

.page-head { margin-bottom: 32px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.page-foot { margin-top: 48px; color: var(--ink-soft); font-size: 15px; }

/* ---------------------------------------------------------- structure */
.step, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 30px);
  margin-bottom: 20px;
}

.step-n {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; margin-right: 10px; vertical-align: baseline;
  background: var(--accent); color: #FBF8F3;
  border-radius: 999px;
  font-family: Manrope, system-ui, sans-serif; font-size: 14px; font-weight: 700;
}

/* ---------------------------------------------------------- lesson cards */
.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  min-height: 44px; padding: 20px; background: var(--card); cursor: pointer;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; color: inherit;
  transition: border-color .14s ease, background .14s ease, transform .14s ease;
}
.card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.card--selected { border-color: var(--accent); background: var(--accent-soft); }
.card-name { font-family: Newsreader, Georgia, serif; font-size: 21px; font-weight: 500; line-height: 1.25; }
.card-desc { color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.card-meta { color: var(--accent); font-size: 15px; font-weight: 700; margin-top: 6px; }

/* ---------------------------------------------------------- timezone bar */
.tz-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px; margin-bottom: 18px;
  background: var(--paper-2); border-radius: var(--radius-sm);
}
.tz-bar label { font-size: 15px; font-weight: 600; }

.week-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; font-size: 15px; color: var(--ink-soft);
}
#range-label { font-weight: 600; color: var(--ink); }

/* ---------------------------------------------------------- slots */
.day { margin-bottom: 24px; }
.day h3 {
  margin: 0 0 10px; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); font-weight: 700;
}
.slot-list { display: flex; flex-wrap: wrap; gap: 10px; }

.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-width: 92px; min-height: 48px; padding: 8px 16px; cursor: pointer;
  background: var(--card); border: 1.5px solid var(--line);
  border-radius: 999px; font: inherit; color: inherit;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.slot:hover { border-color: var(--accent-line); background: var(--paper-2); }
.slot--selected { border-color: var(--accent); background: var(--accent); color: #FBF8F3; }
.slot-time { font-weight: 700; font-size: 16px; }
.slot-alt { font-size: 12px; opacity: .75; }

/* ---------------------------------------------------------- forms */
.form, .stack-form { display: flex; flex-direction: column; gap: 18px; }
.form label, .stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
.form small, .stack-form small { font-weight: 400; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }

input, select, textarea {
  min-height: 48px; padding: 12px 14px; font: inherit; color: inherit;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
textarea { min-height: 96px; }
input:hover, select:hover, textarea:hover { border-color: var(--accent-line); }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}

.row { display: flex; flex-wrap: wrap; gap: 16px; }
.row > label { flex: 1 1 190px; }
.check { flex-direction: row !important; align-items: center; gap: 10px !important; }
.check input { width: auto; min-height: 0; }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 16px 0; }

button.primary, .as-button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 15px 30px; cursor: pointer;
  background: var(--amber); color: var(--ink); text-decoration: none;
  border: none; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 17px; white-space: nowrap;
  box-shadow: var(--shadow-amber);
  transition: background .14s ease;
}
button.primary:hover, .as-button:hover { background: var(--amber-hover); color: var(--ink); }
button.primary:disabled { opacity: .6; cursor: progress; box-shadow: none; }

button.ghost {
  display: inline-flex; align-items: center; min-height: 44px;
  padding: 10px 18px; cursor: pointer; background: transparent; color: var(--accent);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font: inherit; font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: border-color .14s ease, color .14s ease;
}
button.ghost:hover { border-color: var(--accent); }
button.ghost.danger { color: var(--danger); }
button.ghost.danger:hover { border-color: var(--danger); }

/* ---------------------------------------------------------- confirm page */
.when-primary {
  font-family: Newsreader, Georgia, serif; font-weight: 400;
  font-size: clamp(24px, 3.6vw, 32px); line-height: 1.15; margin: 8px 0;
}
.when-secondary { color: var(--ink-soft); margin: 0 0 14px; font-size: 16px; }
.amount { font-size: 20px; font-weight: 700; color: var(--accent); margin: 0; }
.chosen {
  padding: 14px 16px; background: var(--paper-2); border-radius: var(--radius-sm);
  font-size: 15px; line-height: 1.6; margin: 0 0 18px;
}

/* A single route needs no box: the panel around it is already the box, and
   two nested borders read as a form the student has to work through. The
   bordered card only comes back when there is more than one option, i.e.
   when there is genuinely something to choose between. */
.pay-option { margin: 0; }
.pay-option--choice {
  padding: 20px; margin-bottom: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.pay-option h3 { margin: 4px 0 8px; font-family: Newsreader, Georgia, serif; font-size: 20px; font-weight: 500; }
.pay-option .blurb { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin: 0 0 16px; }

.badge {
  display: inline-block; padding: 3px 10px;
  background: var(--amber); color: var(--ink);
  border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.bank-details {
  margin: 0 0 12px; padding: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: 15px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap;
}
.reference-callout {
  padding: 14px 16px; background: var(--warn-soft); border-radius: var(--radius-sm);
  font-size: 15px; line-height: 1.65; margin: 0; color: var(--warn);
}
.reference-callout strong { color: var(--ink); }

.status-panel { text-align: center; color: var(--ink-soft); }
.status-panel--paid { background: var(--ok-soft); border-color: var(--accent-line); color: var(--ok); font-weight: 700; }

/* ---------------------------------------------------------- admin */
.admin-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 14px; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 18px; font-size: 15px; }
.admin-nav a { color: var(--accent); font-weight: 600; }
.admin-nav a:hover { color: var(--plum); }
.admin-nav .logout { color: var(--ink-soft); }

.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin-bottom: 10px; }
.week-col {
  padding: 12px 10px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); min-height: 88px;
}
.week-col h3 { margin: 0 0 8px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); }
.chip-form { display: inline; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; margin-bottom: 6px;
  background: var(--accent-soft); border-radius: 999px; font-size: 13px; font-weight: 600;
}
.chip button { background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 15px; padding: 0; line-height: 1; }

.table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 15px; }
.table th {
  text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--line);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.row--unpaid { background: var(--warn-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.job-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 14px 0; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tag--paid { background: var(--ok-soft); color: var(--ok); }
.tag--unpaid { background: var(--warn-soft); color: var(--warn); }
.tag--intl { background: var(--accent-soft); color: var(--accent); }
.tag--off { background: #EDE9E1; color: var(--ink-soft); }

.login-box {
  max-width: 380px; margin: 80px auto; padding: 32px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---------------------------------------------------------- banners */
.banner { padding: 16px 18px; margin-bottom: 22px; border-radius: var(--radius-sm); font-size: 15px; line-height: 1.65; }
.banner--bad { background: var(--danger-soft); border: 1px solid #E8BCBC; color: var(--danger); }
.banner--warn { background: var(--warn-soft); border: 1px solid #EBD3A9; color: var(--warn); }
.banner code { background: rgba(46, 42, 40, .06); }

/* ---------------------------------------------------------- flashes */
.flashes { margin-bottom: 20px; }
.flash { padding: 14px 16px; margin-bottom: 10px; border-radius: var(--radius-sm); font-size: 15px; }
.flash--ok { background: var(--ok-soft); color: var(--ok); font-weight: 600; }
.flash--error { background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.error { color: var(--danger); font-size: 15px; }

@media (max-width: 640px) {
  .wrap { padding: 28px 18px 80px; }
  .week-grid { grid-template-columns: repeat(2, 1fr); }
  .table { font-size: 14px; }
  .week-nav { font-size: 14px; }
  button.primary, .as-button { width: 100%; font-size: 16px; padding: 15px 20px; }
}
