/**
 * ohana-components.css — Your Ohana shared component library
 * Opt-in: include on pages that use standard components (hero, footer, cards, etc.)
 * Requires ohana-base.css to be loaded first.
 */

/* ===== 1. HERO + WAVE DIVIDER ===== */

.hero {
  position: relative;
  background: var(--hero-gradient, linear-gradient(135deg, #0097a7 0%, #00838f 30%, #006978 60%, #004d5e 100%));
  color: #fff;
  padding: 3.5rem 1.5rem 4.5rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 75%, rgba(255,255,255,0.07) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 25%, rgba(255,255,255,0.05) 0%, transparent 55%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(1.75rem, 4.5vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #fff;
}
.hero-sub {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: #fff;
  max-width: 560px;
  margin: 0 auto 1.5rem;
  line-height: 1.7;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.25rem;
  color: #fff;
}
.wave-divider {
  position: relative;
  margin-top: -2px;
  line-height: 0;
  overflow: hidden;
}
.wave-divider svg {
  display: block;
  width: 200%;
  height: auto;
  min-height: 40px;
}
.wave-divider svg.wave-layer-1 {
  animation: waveFlow 12s linear infinite;
}
.wave-divider svg.wave-layer-2 {
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.45;
  animation: waveFlow 18s linear infinite;
}
@keyframes waveFlow {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@media (max-width: 768px) {
  .hero { padding: 2.5rem 1.25rem 3.5rem; }
}

/* ===== 2. FOOTER ===== */

footer {
  background: #1a1a2e;
  color: #fff;
  padding: 3rem 1.5rem 2rem;
  position: relative;
  margin-top: 2rem;
}
footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--brand-stripe);
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.footer-org {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.25rem;
}
.footer-tagline {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 1.5rem;
}
.footer-nav {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1.25rem;
}
.footer-nav li { display: flex; align-items: center; }
.footer-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0 0.5rem;
  transition: color 0.2s;
}
.footer-nav a:hover { color: var(--brand-blue); }
.footer-nav .sep { color: #fff; font-size: 0.75rem; }
.footer-email { margin-bottom: 1.5rem; }
.footer-email a {
  color: var(--brand-blue);
  text-decoration: none;
  font-size: 0.9rem;
}
.footer-email a:hover { text-decoration: underline; }
.footer-legal {
  font-size: 0.78rem;
  color: #fff; /* full white for max legibility (was rgba .62); footer bg is dark on every page */
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== 3. CARDS ===== */

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: box-shadow 0.2s, transform 0.15s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; color: var(--text-dark); }
.card p, .card li { font-size: 0.92rem; color: var(--text-mid); line-height: 1.7; }

.info-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand-blue);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.15s;
}
.info-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.info-card-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}
.info-card h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.4rem;
}
.info-card p {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.55;
}

/* ===== 4. BUTTONS + FORMS + MESSAGES ===== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 9px 18px;
  border: none;
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover:not(:disabled) { opacity: 0.88; transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--brand-blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-blue-dark); opacity: 1; }
.btn-secondary { background: #edf2f7; color: var(--text-dark); }
.btn-secondary:hover:not(:disabled) { background: #e2e8f0; opacity: 1; }
.btn-outline { background: transparent; color: var(--brand-blue); border: 1.5px solid var(--brand-blue); }
.btn-outline:hover:not(:disabled) { background: rgba(0,186,198,0.08); opacity: 1; }
.btn-sm { padding: 5px 12px; font-size: 0.78rem; }

.field-group { margin-bottom: 1rem; }
.field-group label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.field-group input[type="text"],
.field-group input[type="email"],
.field-group textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text-dark);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0,186,198,0.12);
}
.field-group textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.msg {
  display: none;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.msg.error   { background: #fff0f3; border: 1px solid #f9c0cf; color: #b0003a; }
.msg.success { background: #f0faf5; border: 1px solid #b2dfc8; color: #1a6640; }
.msg.visible { display: block; }

/* ===== 5. SECTION HEADERS + AUTH GATE ===== */

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}
.section-sub {
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}
.content-section { margin-bottom: 2.5rem; }

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.section-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  color: #fff;
}
.section-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.callout {
  background: linear-gradient(135deg, #e0f7fa, #f0fdfa);
  border-left: 4px solid var(--brand-blue);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--teal-dark);
  line-height: 1.7;
}

.auth-gate {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.auth-gate-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.auth-gate h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.4rem; }
.auth-gate p { font-size: 0.9rem; color: var(--text-mid); margin-bottom: 1.25rem; }

/* ===== 6. COLLAPSIBLE / ACCORDION ===== */

.collapsible-trigger {
  background: var(--white);
  border: 1.5px solid #e8ecf1;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 0.5rem;
}
.collapsible-trigger:hover { background: #f8fafb; border-color: var(--brand-blue); }

.collapsible-chevron {
  transition: transform 0.25s;
  font-size: 0.8rem;
  color: var(--text-light);
}
.collapsible-trigger.open .collapsible-chevron { transform: rotate(180deg); }

/* Legacy support: orientation.html uses .arrow class */
.collapsible-trigger .arrow {
  transition: transform 0.25s;
  font-size: 0.8rem;
  color: var(--text-light);
}
.collapsible-trigger.open .arrow { transform: rotate(180deg); }

.collapsible-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  padding: 0 0.25rem;
}
.collapsible-body.open { max-height: 2000px; }

.collapsible-content {
  padding: 0.75rem 1rem 1rem;
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.7;
}
.collapsible-content p { margin-bottom: 0.75rem; }
.collapsible-content ul { margin: 0.5rem 0 0.75rem 1.25rem; }
.collapsible-content li { margin-bottom: 0.3rem; }

/* ===== 7. SPOTLIGHT + BASE MODAL ===== */

/* — Spotlight (card enlarges in-place) — */
.spotlight-card {
  cursor: pointer;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s;
}
.spotlight-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 999;
  pointer-events: none;
  transition: background 0.35s;
}
.spotlight-backdrop.active {
  background: rgba(0,0,0,0.55);
  pointer-events: auto;
}
.spotlight-card.spotlight {
  z-index: 1000;
  background: #fff;
  transform: translate(var(--sl-x, 0), var(--sl-y, 0)) scale(var(--sl-scale, 1.1)) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3), 0 0 0 4px rgba(0,186,198,0.3) !important;
}
.spotlight-detail {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #edf2f7;
  font-size: 0.85rem;
  color: #000;
  line-height: 1.65;
  text-align: left;
}
.spotlight-card.spotlight .spotlight-detail {
  display: block;
  animation: detailFadeIn 0.35s ease;
}
@keyframes detailFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 640px) {
  .spotlight-card.spotlight { transform: translate(0, var(--sl-y, 0)) scale(1.02) !important; }
}

/* Inline edit pencil affordance — shared across edit-modal launchers.
   Low-contrast until hover/focus to avoid visual clutter; full opacity
   on hover or keyboard focus. */
.ohana-inline-edit-pencil {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.85em;
  opacity: 0.4;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0 0.2em;
  vertical-align: middle;
  transition: opacity 0.15s;
}
.ohana-inline-edit-pencil:hover,
.ohana-inline-edit-pencil:focus {
  opacity: 1;
  outline: 2px solid var(--brand-blue, #00BAC6);
  outline-offset: 2px;
}

/* Workgroup-meeting header — clickable meta line when editor */
.wgm-meta-line.wgm-meta-clickable {
  cursor: pointer;
  text-decoration: underline dotted transparent;
  transition: text-decoration-color 0.15s;
}
.wgm-meta-line.wgm-meta-clickable:hover {
  text-decoration-color: var(--brand-blue, #00BAC6);
}

/* Homework digest — last-sent audit line + recipients list */
.wgm-last-sent {
  font-size: 0.85rem;
  color: var(--text-dark, #333);
  margin-top: 0.75rem;
  font-style: italic;
}

.wgm-digest-recipients {
  max-height: 200px;
  overflow-y: auto;
  background: #fafafa;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  padding: 0.5rem 1.25rem;
  margin: 0.5rem 0 1rem;
}
.wgm-digest-recipients li {
  margin: 0.2rem 0;
  font-size: 0.9rem;
}

/* ── Workgroup meeting polling panel ─────────────────────────────────────── */
.wgm-poll-panel { background: #fffbf2; border: 1px solid rgba(255, 165, 0, 0.3); border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.wgm-poll-closes-line { font-size: 0.9rem; margin-top: 0.5rem; color: var(--text-dark); }
.wgm-poll-slot { padding: 0.85rem 1rem; margin-top: 0.85rem; background: #fff; border: 1px solid rgba(0,0,0,0.08); border-radius: 6px; }
.wgm-poll-slot-time { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.35rem; color: var(--text-dark); }
.wgm-poll-slot-conflict-personal { color: #C62828; font-size: 0.85rem; margin-bottom: 0.35rem; font-weight: 500; }
.wgm-poll-slot-conflict-aggregate { color: var(--text-dark); font-size: 0.85rem; margin-bottom: 0.5rem; }
.wgm-poll-tally { font-size: 0.9rem; margin-bottom: 0.5rem; }
.wgm-poll-tally-chip { display: inline-block; margin-right: 0.75rem; }
.wgm-poll-tally-chip-available { color: #2E7D32; }
.wgm-poll-tally-chip-maybe { color: #E65100; }
.wgm-poll-tally-chip-unavail { color: var(--text-dark); }
.wgm-poll-voter-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 0.75rem; background: rgba(0,0,0,0.06); margin: 1px 3px 1px 0; color: var(--text-dark); }
.wgm-poll-vote-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; flex-wrap: wrap; }
.wgm-poll-vote-row .btn { flex: 0 0 auto; }
.wgm-poll-vote-row .btn.selected { outline: 2px solid var(--brand-blue, #00BAC6); outline-offset: 1px; }
.wgm-poll-actions { margin-top: 0.65rem; display: flex; gap: 0.5rem; }
.wgm-poll-panel-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; }

/* ─── Tiptap round 1 additions (2026-05-17) ────────────────────────
   TextAlign renders to native style="text-align: center" etc.
   Subscript/Superscript render to native <sub>/<sup>.
   Browsers style both correctly without extra rules — this comment
   marks where future read-only rules would land if needed. */

/* ─── Tiptap TaskList (read-only render + editor) ───────────────── */
ul[data-type="taskList"] {
  list-style: none;
  padding-left: 0;
  margin-left: 0;
}
ul[data-type="taskList"] li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
ul[data-type="taskList"] li > label {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
ul[data-type="taskList"] li > div {
  flex: 1;
}
ul[data-type="taskList"] li[data-checked="true"] > div > p {
  text-decoration: line-through;
  /* Brand muted-but-readable — NOT grey text (pre-commit Check 7). */
  color: #000;
}

/* ─── Tiptap Details (collapsible sections) ─────────────────────── */
details.ohana-details {
  border-left: 3px solid #00BAC6;
  background: #EDFAFB;
  padding: 0.5rem 0.75rem;
  margin: 0.75rem 0;
  border-radius: 0 4px 4px 0;
}
details.ohana-details > summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
details.ohana-details > summary::-webkit-details-marker {
  display: none;
}
details.ohana-details > summary::before {
  content: '\25B8';
  display: inline-block;
  width: 1.2em;
  transition: transform 0.15s ease;
}
details.ohana-details[open] > summary::before {
  transform: rotate(90deg);
}

/* ===== Switch toggle (reusable) ===== */
.ohana-switch { display: inline-flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.ohana-switch > input { position: absolute; opacity: 0; width: 0; height: 0; }
.ohana-switch-track {
  position: relative; flex-shrink: 0; width: 42px; height: 24px;
  background: #cfd8e3; border-radius: 999px; transition: background 0.18s;
}
.ohana-switch-track::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.18s;
}
.ohana-switch > input:checked + .ohana-switch-track { background: var(--brand-green, #4a9d3f); }
.ohana-switch > input:checked + .ohana-switch-track::after { transform: translateX(18px); }
.ohana-switch > input:focus-visible + .ohana-switch-track { box-shadow: 0 0 0 3px rgba(0,186,198,0.35); }
.ohana-switch-label { font-size: 0.88rem; font-weight: 600; color: var(--text-dark, #333); }
