/* Shared bizos-family design system — this palette/type scale originates from
   Wisp (wisp.bizos.uk) and is the single source of truth for Match, Planner,
   and Wisp alike. Wisp itself is dark-only by design; the light variant below
   is this system's own addition so Match/Planner's theme toggle keeps working. */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,500&family=Public+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');
:root {
  --bg: #14181c;
  --bg-alt: #1b222a;
  --bg-input: #29323c;
  --border: #384250;
  --border-soft: #29323c;
  --text: #cfe8e6;
  --text-muted: #93a5ab;
  --text-soft: #b7cbc8;
  --link: #35e5ff;
  --glow: #ff3ec9;
  --glow-2: #35e5ff;
  --ink: #14181c;
  --verified: #7fd1ae;
  --warn: #f5b942;
  --danger: #e8788a;
  --font-display: 'Source Serif 4', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --radio-panel-1: #3a2a17;
  --radio-panel-2: #241a0d;
  --radio-panel-border: #4a3620;
}
[data-theme="light"] {
  --bg: #f4f6f6;
  --bg-alt: #ffffff;
  --bg-input: #eef2f2;
  --border: #d7e0df;
  --border-soft: #e3e9e8;
  --radio-panel-1: #e8d9be;
  --radio-panel-2: #d4c19c;
  --radio-panel-border: #b89f6e;
  --text: #16211f;
  --text-muted: #5c6b70;
  --text-soft: #37454a;
  --link: #0891b2;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  transition: background 0.15s ease, color 0.15s ease;
}
a { color: var(--link); }
h1, h2, h3, .card h3 { font-family: var(--font-display); font-weight: 500; }
/* Bottom dock nav — same technique as the wall clock app's #dock: a fixed,
   centered, wrapping row of pill buttons, rather than a top header/nav bar. */
.bizos-dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.6rem; padding: 0.7rem 1rem;
  background: var(--bg-alt); border-top: 1px solid var(--border);
}
.bizos-dock a, .bizos-dock button {
  position: relative;
  background: var(--bg-input); color: var(--text-soft); border: none;
  border-radius: 999px; padding: 0.5rem 1rem; font-size: 0.85rem; font-family: inherit;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.bizos-dock a:hover, .bizos-dock button:hover { color: var(--text); }
.bizos-dock a.active { background: var(--link); color: var(--ink); font-weight: 600; }
.nav-icon { position: relative; display: inline-block; font-style: normal; }
.badge-dot {
  position: absolute; top: -7px; right: -11px;
  background: #e0483f; color: #fff; border-radius: 999px;
  font-size: 0.62rem; font-weight: 700; line-height: 1;
  min-width: 15px; height: 15px; padding: 2px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--bg-alt);
}
main { max-width: 780px; margin: 0 auto; padding: 2rem 1.5rem 6rem; }
h1 { font-size: 1.6rem; margin-bottom: 1rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 0.8rem; color: var(--text-soft); }
.card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.2rem 1.4rem; margin-bottom: 1rem;
}
.card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.card .meta { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.tag {
  display: inline-block; background: #22273a; color: #a9c2ff;
  border-radius: 999px; padding: 0.15rem 0.7rem; font-size: 0.8rem; margin: 0 0.3rem 0.3rem 0;
}
.tag.match { background: #1f3d2b; color: #7fe3a3; }
form { display: flex; flex-direction: column; gap: 0.9rem; max-width: 520px; }
label { font-size: 0.9rem; color: var(--text-soft); display: flex; flex-direction: column; gap: 0.3rem; }
input, textarea, select {
  background: var(--bg-input); border: 1px solid var(--border-soft); color: var(--text);
  border-radius: 8px; padding: 0.6rem 0.7rem; font-size: 0.95rem; font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
button, .btn {
  background: linear-gradient(135deg, var(--glow), var(--glow-2)); color: var(--ink); border: none; border-radius: 8px;
  padding: 0.65rem 1.2rem; font-size: 0.95rem; font-weight: 600; cursor: pointer; align-self: flex-start;
  text-decoration: none; display: inline-block;
  box-shadow: 0 0 14px rgba(255,62,201,0.35), 0 0 26px rgba(53,229,255,0.18);
}
button:hover, .btn:hover { opacity: 0.9; }
.btn.secondary { background: var(--border); color: var(--text); box-shadow: none; font-weight: 400; }
.btn.secondary:hover { background: var(--border-soft); opacity: 1; }
.oauth-divider { display: flex; align-items: center; gap: 0.8rem; margin: 1.1rem 0; max-width: 520px; color: var(--text-muted); font-size: 0.85rem; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.oauth-buttons { display: flex; flex-direction: column; gap: 0.6rem; max-width: 520px; }
.oauth-google { background: #fff; color: #1f1f1f; text-align: center; }
.oauth-google:hover { background: #e8e8e8; }
.oauth-apple { background: #000; color: #fff; text-align: center; }
.oauth-apple:hover { background: #1a1a1a; }
.hint { color: var(--text-muted); font-size: 0.88rem; }
.error { background: #3d1f22; border: 1px solid #6b2a30; color: #ffb4bb; padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.success { background: #1f3d2b; border: 1px solid #2a6b3f; color: #9be3ae; padding: 0.7rem 1rem; border-radius: 8px; margin-bottom: 1rem; }
.grid-links { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1rem; }
.grid-links .btn { flex: 1 1 200px; text-align: center; position: relative; }
.grid-links .btn .badge-dot { top: -8px; right: -8px; box-shadow: 0 0 0 2px var(--bg); }

/* ---- Corkboard (Planner photos/documents/sticky notes) ---- */
.corkboard {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.1rem; margin: 1rem 0;
}
.sticky {
  background: var(--sticky-bg); color: var(--sticky-text);
  border-radius: 4px; padding: 1rem 1rem 2.2rem;
  min-height: 120px; position: relative; font-size: 0.92rem; line-height: 1.4;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.35);
  transform: rotate(-2deg);
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.corkboard > *:nth-child(3n+2) .sticky, .corkboard > .sticky:nth-child(3n+2) { transform: rotate(1.5deg); }
.corkboard > *:nth-child(3n) .sticky, .corkboard > .sticky:nth-child(3n) { transform: rotate(-1deg); }
.sticky:hover { transform: rotate(0deg) scale(1.03); }
.sticky p { margin: 0; word-break: break-word; }
.sticky-remove {
  position: absolute; bottom: 0.5rem; right: 0.6rem;
  background: rgba(128,128,128,0.3); color: var(--sticky-text); border: none; border-radius: 50%;
  width: 1.6rem; height: 1.6rem; font-size: 1rem; line-height: 1; cursor: pointer;
}
.sticky-remove:hover { background: rgba(128,128,128,0.5); }

/* Sticky note colors — dark mode (default): deep/muted tones with light text so
   notes don't read as jarring bright cutouts against a dark corkboard. Light mode
   below flips to the classic bright pastel-paper-with-dark-text look. */
.sticky-yellow { --sticky-bg: #6b5a20; --sticky-text: #fdf1c7; }
.sticky-orange { --sticky-bg: #6e4520; --sticky-text: #ffdfc0; }
.sticky-green  { --sticky-bg: #3e4e30; --sticky-text: #dcecc9; }
.sticky-teal   { --sticky-bg: #274c4f; --sticky-text: #cdeced; }
.sticky-pink   { --sticky-bg: #61324a; --sticky-text: #f7d3e5; }
.sticky-purple { --sticky-bg: #3e3160; --sticky-text: #e2d8fb; }
:root[data-theme="light"] .sticky-yellow { --sticky-bg: #f4d35e; --sticky-text: #1a1a1a; }
:root[data-theme="light"] .sticky-orange { --sticky-bg: #ee964b; --sticky-text: #1a1a1a; }
:root[data-theme="light"] .sticky-green  { --sticky-bg: #a1c181; --sticky-text: #1a1a1a; }
:root[data-theme="light"] .sticky-teal   { --sticky-bg: #7fb7be; --sticky-text: #1a1a1a; }
:root[data-theme="light"] .sticky-pink   { --sticky-bg: #e07a9d; --sticky-text: #1a1a1a; }
:root[data-theme="light"] .sticky-purple { --sticky-bg: #c8b6ff; --sticky-text: #1a1a1a; }
.cork-card {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.7rem; box-shadow: 2px 4px 10px rgba(0,0,0,0.3);
}
.cork-card img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; display: block; }
.cork-doc { display: flex; flex-direction: column; gap: 0.5rem; min-height: 140px; justify-content: center; align-items: flex-start; }
.cork-doc a { word-break: break-word; }

/* ---- POV Shot List ---- */
.pov-list { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.pov-item {
  display: flex; align-items: center; gap: 0.7rem;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.6rem 0.9rem;
}
.pov-item.done { opacity: 0.55; }
.pov-item.done .pov-text { text-decoration: line-through; }
.pov-check {
  background: none; border: none; font-size: 1.1rem; padding: 0; cursor: pointer; align-self: center;
}
.pov-text { flex: 1; font-size: 0.95rem; }
.pov-remove {
  background: none; border: none; color: var(--text-muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 0.2rem;
}
.pov-remove:hover { color: #ffb4bb; }

/* ---- Timeline ---- */
main.timeline-page { max-width: 1100px; }
.tl-controls { display: flex; align-items: center; justify-content: space-between; margin: 1rem 0; }
.tl-zoom { display: flex; gap: 0.4rem; }
.tl-zoom-btn {
  background: var(--bg-alt); color: var(--text-soft); border: 1px solid var(--border); border-radius: 8px;
  padding: 0.5rem 1rem; font-size: 0.9rem; cursor: pointer;
}
.tl-zoom-btn.active { background: #3d7bfd; color: #fff; border-color: #3d7bfd; }
#tl-viewport {
  position: relative; overflow-x: auto; overflow-y: hidden;
  height: 210px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.5rem 0;
}
#tl-track { position: relative; height: 100%; min-width: 100%; }
#tl-line { position: absolute; top: 90px; left: 0; height: 0; border-top: 2px dashed var(--border-soft); }
#tl-ticks { position: absolute; top: 100px; left: 0; height: 90px; }
.tl-tick { position: absolute; top: 0; width: 1px; height: 8px; background: var(--border-soft); }
.tl-tick span {
  position: absolute; top: 12px; left: 3px; font-size: 0.72rem; color: var(--text-muted); white-space: nowrap;
  transform-origin: top left; transform: rotate(90deg);
}
.tl-tick-month { height: 14px; background: #4a5266; }
.tl-tick-month span { font-weight: 600; color: var(--text-soft); }
#tl-events { position: absolute; top: 0; left: 0; width: 100%; height: 90px; }
#tl-todayline {
  position: absolute; top: 20px; height: 160px; width: 0; border-left: 2px solid #e0483f; z-index: 1;
}
.tl-dot-wrap { position: absolute; top: 60px; transform: translateX(-50%); cursor: pointer; text-align: center; z-index: 2; }
.tl-dot {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700; color: #fff;
  border: 2px solid var(--bg-input); box-shadow: 0 0 0 1px rgba(255,255,255,0.15);
}
.tl-dot-travel { background: #2a9d5c; }
.tl-dot-business { background: #3d7bfd; }
.tl-dot-plan { width: 24px; height: 24px; top: -3px; }
.tl-dot-cluster { background: #8b5cf6; }
.tl-dot-label {
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  font-size: 0.7rem; color: var(--text-soft); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis;
}
.tl-popover {
  position: absolute; z-index: 10; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
  padding: 0.9rem 1rem; width: 260px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.tl-popover.hidden { display: none; }
.tl-popover h4 { margin: 0 0 0.3rem; font-size: 1rem; }
.tl-pop-photo { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin: 0.5rem 0; }
.tl-weather-bubble {
  display: inline-block; background: #22273a; color: #a9c2ff; border-radius: 999px;
  padding: 0.3rem 0.8rem; font-size: 0.85rem; margin-top: 0.3rem;
}
.tl-pop-list { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.5rem; max-height: 220px; overflow-y: auto; }
.tl-pop-list a { font-size: 0.85rem; }

/* ---- Radio-dial seek bar ---- */
/* Panel wood tone follows the theme (dark walnut / light oak); the dial window
   itself (#tl-seek-track below) stays dark in both — an authentic radio dial is
   a backlit slot regardless of the cabinet color around it. */
#tl-seekbar {
  margin-top: 0.7rem; padding: 0.7rem 1rem;
  background: linear-gradient(180deg, var(--radio-panel-1), var(--radio-panel-2));
  border: 1px solid var(--radio-panel-border); border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 4px 10px rgba(0,0,0,0.4);
  transition: background 0.15s ease, border-color 0.15s ease;
}
#tl-seek-track {
  position: relative; height: 26px; border-radius: 999px; cursor: pointer;
  background:
    repeating-linear-gradient(90deg, rgba(255,214,140,0.25) 0px, rgba(255,214,140,0.25) 1px, transparent 1px, transparent 10px),
    linear-gradient(180deg, #140d06, #1f150a);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), inset 0 -1px 0 rgba(255,255,255,0.05);
}
#tl-seek-fill {
  position: absolute; top: 3px; height: 20px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,196,102,0.35), rgba(255,150,40,0.18));
  box-shadow: inset 0 0 6px rgba(255,196,102,0.4);
  pointer-events: none;
}
#tl-seek-handle {
  position: absolute; top: -7px; width: 6px; height: 40px; transform: translateX(-50%);
  cursor: grab; display: flex; justify-content: center;
}
#tl-seek-handle::before {
  content: ""; position: absolute; top: 0; bottom: 6px; width: 3px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, #ffd98a, #e08a2e);
  border-radius: 3px;
  box-shadow: 0 0 8px 1px rgba(255,180,80,0.7);
}
#tl-seek-handle.active { cursor: grabbing; }
.tl-seek-knob {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9c2, #e0a545 55%, #8a5a1e 100%);
  border: 1px solid #6b4416;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5), 0 0 6px rgba(255,196,102,0.6);
}
/* Date labels under the seek bar — same perpendicular (rotated) treatment as
   the main timeline's date ticks (.tl-tick span), just smaller since the
   seek bar is a compact mini-map of the whole range, not the working view. */
#tl-seek-ticks { position: relative; height: 34px; margin-top: 4px; }
.tl-seek-tick { position: absolute; top: 0; width: 1px; height: 5px; background: var(--radio-panel-border); }
.tl-seek-tick span {
  position: absolute; top: 7px; left: 3px; font-size: 0.62rem; color: var(--text-soft); white-space: nowrap;
  transform-origin: top left; transform: rotate(90deg);
}

/* ---- Rich tablet (Planner) theme ---- */
body.rich-tablet h1 { font-size: 2.1rem; letter-spacing: -0.01em; }
body.rich-tablet h2 { font-size: 1.4rem; font-weight: 600; color: var(--text); margin-top: 2rem; }
body.rich-tablet main { max-width: 1300px; }

/* Landscape-only lock: full-screen prompt in portrait, content hidden.
   Disabled for now (2026-09-11) per request — kept here, commented out, so it's
   a one-line uncomment to bring back rather than having to rebuild it.
#rotate-overlay { display: none; }
@media (orientation: portrait) {
  body.rich-tablet #rotate-overlay {
    display: flex; align-items: center; justify-content: center; text-align: center;
    position: fixed; inset: 0; z-index: 999; background: var(--bg); color: var(--text);
    font-size: 1.3rem; line-height: 1.8; padding: 2rem;
  }
  #rotate-overlay div { font-size: 3rem; }
  #rotate-overlay div br + * { font-size: 1.2rem; }
  body.rich-tablet > header, body.rich-tablet > main { display: none; }
}
*/
#rotate-overlay { display: none; }

/* Collapsible rich panels (used for forms tucked out of the way to reduce clutter) */
.rich-panel {
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px;
  padding: 0.9rem 1.2rem; margin: 1rem 0;
}
.rich-panel summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; color: var(--text-soft);
  list-style: none; display: flex; align-items: center; gap: 0.5rem;
}
.rich-panel summary::-webkit-details-marker { display: none; }
.rich-panel summary::before { content: "▸"; transition: transform 0.15s ease; }
.rich-panel[open] summary::before { transform: rotate(90deg); }
.rich-panel form { margin-top: 1rem; }

/* Two-column landscape layout for a trip's detail page */
.trip-columns { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(380px, 1.3fr); gap: 2rem; align-items: start; }
.trip-col-left, .trip-col-right { min-width: 0; }
@media (max-width: 900px) { .trip-columns { grid-template-columns: 1fr; } }

/* Richer multi-column plan grid on the timeline page */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
