/* ===========================================================================
   Shadchan portal — "Paper Desk"
   Loaded after styles.css by every page under /meet/. This file adds only the
   pieces the portal needs on top of the site system; the nav, cards, buttons,
   fields and tokens all come from styles.css unchanged.

   Rule of thumb while editing: if a colour is written here as a literal hex,
   it is a bug. Everything resolves through the role tokens, so a block wrapped
   in .on-dark flips without a second set of rules.
   =========================================================================== */

/* ---------- [hidden] means hidden ----------
   The browser's own `[hidden] { display: none }` lives in the UA stylesheet, so
   ANY author rule that sets a display — .field is display:flex, .pt-paid and
   .pt-error too — silently outranks it and the element stays on screen with
   the attribute set. That is not a styling nit: the JS on these pages hides
   things that must not be filled in (see meet/change-password.html, which hides
   the current-password field on a first login), and a hide that does nothing
   puts a required-looking field back in front of someone who has no value for
   it. One rule, so the next element to be toggled is covered without anyone
   having to rediscover this. */
[hidden] { display: none !important; }

/* ---------- Page frame ---------- */
.pt-shell { padding: 40px 0 80px; }
.pt-wrap { width: 100%; max-width: 820px; margin: 0 auto; padding: 0 24px; }

.pt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.pt-head h1 { margin-bottom: 6px; }
.pt-sub { color: var(--muted); }

/* ---------- The dark strip: payout + next meeting ---------- */
.pt-hero {
  border-radius: var(--radius);
  border: 1px solid var(--gold-t22);
  padding: 26px 28px;
  margin: 22px 0 36px;
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
}
.pt-stat {
  font-family: var(--display); font-size: 2rem; line-height: 1;
  color: var(--gold-soft); /* role token: deep gold on paper, bright on dark */
  font-variant-numeric: tabular-nums;
}
.pt-hero-div { width: 1px; align-self: stretch; background: var(--border); }
.pt-hero-next { flex: 1; min-width: 190px; }
.pt-hero-next .pt-name { color: var(--cream); font-weight: 500; margin-top: 6px; overflow-wrap: anywhere; }

.pt-lbl {
  font-size: .7rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--eyebrow-c); font-weight: 600;
}
.pt-fine { font-size: .78rem; color: var(--faint); margin-top: 4px; }

/* ---------- Payment-sent notice ----------
   Quiet by design: it is good news that needs no action, so it gets a tint and
   a check mark rather than the gold border reserved for "this needs you". */
.pt-paid {
  display: flex; align-items: flex-start; gap: 12px;
  margin: -18px 0 34px; padding: 14px 18px;
  border: 1px solid var(--gold-t22); border-radius: var(--radius-sm);
  background: var(--gold-t06); font-size: .9rem;
}
.pt-paid-mark {
  color: var(--gold-text); font-weight: 700; line-height: 1.5; flex-shrink: 0;
}

/* ---------- Sections ---------- */
.pt-sec { margin-bottom: 34px; }
.pt-sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pt-sec-head h2 { font-size: 1.3rem; margin: 0; }
.pt-sec-head h3 { margin: 0; }
.pt-note { font-size: .8rem; color: var(--faint); margin-top: 8px; }

/* ---------- Meeting / hours rows ----------
   Modelled on .info-row but deliberately without its hover lift: a list of ten
   meetings that all jump on hover reads as noise, not as feedback. */
.pt-row {
  display: flex; align-items: center; gap: 16px;
  padding: 15px 20px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface);
}
.pt-row .pt-when { min-width: 172px; font-variant-numeric: tabular-nums; }
.pt-row .pt-who { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--cream); font-weight: 500; }
.pt-row .pt-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* The one row type that asks the shadchan for something. design.md allows a
   single accent hue, so "needs you" is carried by the gold border and tint
   rather than by a second colour. */
.pt-row.is-action { border-color: var(--gold-deep); background: var(--gold-t06); }

/* History: same columns, quieter — a rule instead of a card. */
.pt-hist { border-top: 1px solid var(--border-soft); padding-top: 20px; }
.pt-hist .pt-row {
  border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0;
  background: transparent; padding: 12px 2px; margin-bottom: 0; font-size: .92rem;
}
.pt-hist .pt-row .pt-when { color: var(--muted); }
.pt-hist .pt-row .pt-who { font-weight: 400; }

/* ---------- Status pills ---------- */
.pt-pill {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: .7rem; font-weight: 600; letter-spacing: .04em;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.pt-pill--act  { background: var(--gold-t12); color: var(--gold-soft); border: 1px solid var(--gold-deep); }
.pt-pill--done { background: var(--border-soft); color: var(--muted); border: 1px solid var(--border-soft); }
.pt-pill--bad  { background: rgba(194, 39, 42, .07); color: var(--destructive); border: 1px solid rgba(194, 39, 42, .28); }

/* ---------- Availability calendar ----------
   A picture of the rules and overrides listed below it, never a second editor.
   Cells are painted by class only, so the JS decides meaning and the CSS
   decides colour — the two never argue about which gold. */
.pt-cal { overflow-x: auto; }
.pt-cal-grid { display: grid; gap: 3px; min-width: 520px; }
.pt-cal-hd { text-align: center; padding-bottom: 6px; line-height: 1.25; }
.pt-cal-hd span {
  display: block; font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
}
.pt-cal-hd b { font-family: var(--display); font-weight: 600; color: var(--cream); font-size: .96rem; }
.pt-cal-hr {
  font-size: .66rem; color: var(--faint); text-align: right;
  padding-right: 8px; line-height: 22px; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.pt-cal-cell { height: 22px; border-radius: 3px; background: var(--bg-2); }
.pt-cal-cell.is-open { background: linear-gradient(135deg, var(--gold-highlight), var(--gold)); }
/* Added time reads as open-but-exceptional: same hue, lighter weight. */
.pt-cal-cell.is-add { background: var(--gold-t30); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.pt-cal-cell.is-block {
  background: repeating-linear-gradient(45deg,
    var(--bg-2), var(--bg-2) 3px, rgba(194, 39, 42, .22) 3px, rgba(194, 39, 42, .22) 6px);
}
.pt-cal-key {
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  margin-top: 14px; font-size: .78rem; color: var(--muted);
}
.pt-cal-key i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; vertical-align: -2px; margin-right: 7px; }
.pt-cal-key .k-open { background: linear-gradient(135deg, var(--gold-highlight), var(--gold)); }
.pt-cal-key .k-add { background: var(--gold-t30); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.pt-cal-key .k-block {
  background: repeating-linear-gradient(45deg,
    var(--bg-2), var(--bg-2) 3px, rgba(194, 39, 42, .22) 3px, rgba(194, 39, 42, .22) 6px);
}

/* ---------- Inline add-form (availability) ---------- */
.pt-form {
  display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
  margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--border-soft);
}
.pt-form .field { margin: 0; }
.pt-form .field label { font-size: .7rem; }
.pt-form .field input, .pt-form .field select { padding: 9px 12px; font-size: .9rem; }

/* ---------- Show / hide a password ----------
   Wrapper is injected by SLPortal.attachReveal(); the markup on the page is a
   plain .field > input, so with JS off the field is simply a normal password
   box. Padding-right keeps the longest label ("Hide"/"Show") off the text. */
.pt-reveal { position: relative; display: flex; }
.pt-reveal input { flex: 1 1 auto; width: 100%; padding-right: 74px; }
.pt-reveal-btn {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer;
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-family: var(--sans); font-size: .7rem; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted); transition: color .2s;
}
.pt-reveal-btn:hover { color: var(--gold-soft); }
.pt-reveal-btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* ---------- Read-only field ----------
   Looks like a field so it reads as part of the form, but carries no input
   affordance — no box, no border — so it never invites a click that does
   nothing. */
.pt-readonly {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; flex-wrap: wrap;
  margin-bottom: 22px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft);
}
.pt-readonly-lbl {
  display: block; font-size: .82rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.pt-readonly p { color: var(--cream); overflow-wrap: anywhere; }
.pt-readonly-note { font-size: .78rem; color: var(--faint); }

/* ---------- Errors ----------
   Never display:none by default in CSS alone — the JS toggles [hidden], which
   the blanket rule at the top of this file enforces. */
.pt-error {
  color: var(--destructive); font-size: .88rem;
  margin-top: 16px; padding: 12px 16px;
  border: 1px solid rgba(194, 39, 42, .28); border-radius: var(--radius-sm);
  background: rgba(194, 39, 42, .05);
}

/* ---------- Centred auth pages (login, set password) ---------- */
.pt-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.pt-auth-inner { max-width: 420px; width: 100%; }
/* The wordmark is a white lockup and the paper variant is a pale gold that
   washes out on ivory, so the logo gets the system's dark bookend to sit on —
   the same move the nav, footer and hero card make. */
.pt-auth-brand {
  display: flex; justify-content: center; align-items: center;
  width: 132px; height: 84px; margin: 0 auto 26px;
  border-radius: var(--radius); border: 1px solid var(--gold-t22);
}
.pt-auth-brand img { height: 52px; width: auto; display: block; }

/* ---------- Nav identity (right of the portal nav) ---------- */
.pt-nav-id {
  display: flex; align-items: center; gap: 14px; font-size: .84rem; color: var(--muted);
  margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--border);
}
.pt-nav-id .pt-nav-name { color: var(--cream); overflow-wrap: anywhere; }

/* ---------- Tour ---------- */
.pt-tour-highlight { outline: 2px solid var(--gold-deep); outline-offset: 4px; border-radius: var(--radius-sm); }
/* Absolute, not fixed: the tour scrolls each anchor into view and the site
   sets scroll-behavior:smooth, so a viewport-anchored tip would be placed
   from a rect read before the scroll finished and then drift. Document
   coordinates are immune to when the scroll lands. */
.pt-tour-tip {
  position: absolute; max-width: 290px; z-index: 999;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 16px 18px; font-size: .88rem; box-shadow: var(--shadow);
}
.pt-tour-tip p { margin-bottom: 12px; }

/* The site's nav collapses to a drawer at 940px and .nav-links becomes a
   column, where a vertical rule beside the name reads as a stray mark. */
@media (max-width: 940px) {
  .pt-nav-id {
    margin: 14px 0 0; padding: 14px 8px 0;
    border-left: 0; border-top: 1px solid var(--border-soft);
    justify-content: space-between;
  }
}

@media (max-width: 640px) {
  .pt-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .pt-row .pt-when { min-width: 0; }
  .pt-hero { gap: 20px; }
  .pt-hero-div { display: none; }
  .pt-nav-id { font-size: .8rem; }
}
