/* ============================================================
   TLT Annual Meeting App — styles
   Palette and type pairing match TLT's existing web tooling:
   navy / tan-gold, Merriweather (serif) + Inter (sans).
   ============================================================ */

:root {
  --navy: #1e2d45;
  --navy-deep: #131f33;
  --gold: #b8a46a;
  --gold-soft: #d9cca0;
  --cream: #e8dfc8;
  --white: #ffffff;
  --slate: #5b6a82;
  --slate-light: #8f9cb3;
  --line: rgba(30, 45, 69, 0.12);

  --serif: "Merriweather", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --radius: 14px;
  --tab-bar-height: 64px;
  --header-height: 56px;
  /* iPhone status bar / notch. The viewport uses viewport-fit=cover, so the
     page runs underneath the status bar; the header must reserve that space
     or the clock/wifi/battery draw on top of the title. 0 on desktop/Android. */
  --safe-top: env(safe-area-inset-top, 0px);
  /* Home-indicator area. The tab bar adds it on top of its 64px so the icons
     and labels keep their full height instead of being squeezed. */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --tab-bar-total: calc(var(--tab-bar-height) + var(--safe-bottom));
  --header-total: calc(var(--header-height) + var(--safe-top));
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-deep);
  color: var(--navy);
  font-family: var(--sans);
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  justify-content: center;
}

#app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--white);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}

/* -------------------- Header -------------------- */

.app-header {
  height: var(--header-total);
  padding-top: var(--safe-top);
  flex: 0 0 auto;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  padding-left: 16px;
  padding-right: 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-header .back-btn {
  background: none;
  border: none;
  color: var(--gold-soft);
  font-size: 22px;
  line-height: 1;
  padding: 4px 6px 4px 0;
  cursor: pointer;
}

.header-logo {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
}

.header-logo-link {
  display: flex;
  flex: 0 0 auto;
}

.search-btn {
  background: none;
  border: none;
  color: var(--gold-soft);
  padding: 4px;
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
}

.search-btn svg { width: 20px; height: 20px; }

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
}

.app-header h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 18px;
  margin: 0;
  flex: 1;
  overflow: hidden;
  /* A title that doesn't fit on one line wraps to two (the header is 56px
     tall) instead of being cut off with "...". Titles that fit are unchanged. */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* -------------------- Main content -------------------- */

#view {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-bottom: calc(var(--tab-bar-total) + 24px);
  -webkit-overflow-scrolling: touch;
}

.view-pad {
  padding: 20px 20px 8px;
}

.eyebrow {
  color: var(--slate);
  font-size: 13px;
  margin: 0 0 4px;
}

.section-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 4px;
}

.section-sub {
  color: var(--slate);
  font-size: 14px;
  margin: 0 0 20px;
}

/* -------------------- Home: day picker -------------------- */

.day-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 0 20px 20px;
}

.day-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.day-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--navy);
  border-radius: var(--radius);
  padding: 18px 18px;
  text-decoration: none;
  color: var(--white);
  border: 1px solid var(--navy);
}

.day-card .date-num {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 700;
  color: var(--gold);
  min-width: 46px;
}

.day-card .day-meta {
  flex: 1;
}

.day-card .day-name {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 2px;
}

.day-card .day-count {
  font-size: 13px;
  color: var(--gold-soft);
  margin: 0;
}

.day-card .chevron {
  color: var(--gold-soft);
  font-size: 20px;
}

/* CE credits banner (lives on the home view until it's ready) */

.ce-banner {
  margin: 18px 20px 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: #faf8f2;
}

.ce-banner .ce-title {
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 2px;
}

.ce-banner .ce-note {
  font-size: 13px;
  color: var(--slate);
  margin: 0;
}

.cta-btn {
  display: inline-block;
  margin-top: 10px;
  background: var(--navy);
  color: var(--white);
  text-decoration: none;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 8px;
}

.cta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cta-row .cta-btn { margin-top: 10px; }

.cta-btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--navy);
}

.cta-btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  margin-top: 0;
}

.cta-btn-icon svg { width: 15px; height: 15px; }

/* -------------------- List rows (sessions, partners, restaurants, activities) -------------------- */

.block-label {
  margin: 18px 20px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.block-label:first-of-type { margin-top: 14px; }

.floor-map-wrap {
  padding: 4px 20px 16px;
}

.floor-map-img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  display: block;
}

.stall-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.partner-logo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px;
}

.partner-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  min-height: 116px;
}

.partner-logo-img {
  max-width: 100%;
  max-height: 66px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.list-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.list-row:last-child { border-bottom: none; }

/* Deep-linked session (#/day/<day>/<session>): brief highlight on arrival */
.list-row[id^="session-"] {
  transition: background-color 0.8s ease;
}
.list-row.session-flash { background-color: rgba(184, 164, 106, 0.22); }

.list-row .row-accent {
  width: 3px;
  align-self: stretch;
  background: var(--gold);
  border-radius: 2px;
  flex: 0 0 auto;
}

.list-row .row-main { flex: 1; min-width: 0; }

.list-row .row-time {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--slate);
  min-width: 64px;
  padding-top: 1px;
}

.row-title {
  font-weight: 600;
  font-size: 15px;
  margin: 0 0 3px;
  color: var(--navy);
}

.row-time-badge {
  display: inline-block;
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  background: var(--cream);
  padding: 2px 8px;
  border-radius: 5px;
  margin: 0 0 6px;
}

.break-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 20px;
  background: #faf8f2;
  border-bottom: 1px solid var(--line);
}

.break-time {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--slate);
  flex: 0 0 auto;
}

.break-label {
  font-size: 12px;
  font-style: italic;
  color: var(--slate);
}

.row-desc {
  font-size: 13px;
  color: var(--slate);
  margin: 0 0 6px;
  line-height: 1.4;
}

.row-quote {
  font-size: 13px;
  font-style: italic;
  color: var(--navy);
  border-left: 2px solid var(--gold);
  padding-left: 10px;
  margin: 0 0 6px;
  line-height: 1.45;
}

.row-detail {
  font-size: 13px;
  color: var(--slate);
  margin: 0;
}

.row-links {
  margin: 4px 0 0;
  font-size: 13px;
}

.row-links a {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
}

/* -------------------- Person / partner detail -------------------- */

.detail-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--cream);
  margin: 4px 20px 16px;
  object-fit: cover;
  display: block;
}

.detail-name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 2px;
  padding: 0 20px;
}

.detail-role {
  color: var(--slate);
  font-size: 14px;
  margin: 0 0 18px;
  padding: 0 20px;
}

.detail-bio {
  font-size: 15px;
  line-height: 1.6;
  padding: 0 20px 24px;
  white-space: pre-line;
}

/* -------------------- Directory tabs (People / Partners) -------------------- */

.subtab-row {
  display: flex;
  gap: 8px;
  padding: 0 20px 16px;
}

.subtab-btn {
  flex: 1;
  padding: 9px 0;
  text-align: center;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  cursor: pointer;
}

.subtab-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

/* -------------------- Explore cards (venue, activities) -------------------- */

.explore-card {
  margin: 0 20px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* -------------------- Evening spotlight (made to stand out) -------------------- */

.evening-spotlight {
  margin: 0 20px 20px;
  padding: 20px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
}

.evening-spark {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 20px;
  height: 20px;
  color: var(--gold);
  opacity: 0.85;
}

.evening-time {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--gold);
  margin: 0 0 6px;
  text-transform: uppercase;
}

.evening-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 6px;
}

.evening-desc {
  font-size: 14px;
  color: var(--gold-soft);
  line-height: 1.5;
  margin: 0;
}

/* -------------------- Home: evening clubbed with its day -------------------- */

.day-evening-sub {
  margin: 0;
  padding: 12px 16px;
  background: var(--navy-deep);
  border-radius: 0 0 10px 10px;
  border: 1px solid var(--gold);
  border-top: none;
}

.day-evening-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 3px;
}

.day-evening-title {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 4px;
}

.day-evening-desc {
  font-size: 12px;
  color: var(--gold-soft);
  line-height: 1.4;
  margin: 0;
}

/* -------------------- Resources grid -------------------- */

.resource-grid {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.resource-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.resource-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  color: var(--gold);
}

.resource-icon svg { width: 100%; height: 100%; }

.resource-main { flex: 1; min-width: 0; }

.explore-card .row-title { margin-bottom: 4px; }

/* -------------------- Contact form -------------------- */

.contact-form {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
}

.field textarea { min-height: 110px; resize: vertical; }

.submit-btn {
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.submit-btn:disabled { opacity: 0.6; }

.join-community-btn {
  width: 100%;
  background: none;
  border: 1px dashed var(--gold);
  color: var(--navy);
  border-radius: 10px;
  padding: 13px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.see-more-btn {
  width: 100%;
  background: var(--cream);
  border: none;
  color: var(--navy);
  border-radius: 10px;
  padding: 13px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.form-status {
  font-size: 13px;
  margin-top: -4px;
}

.form-status.ok { color: #2f6f4e; }
.form-status.err { color: #a13d3d; }

.thank-you {
  padding: 60px 32px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thank-you-icon {
  width: 56px;
  height: 56px;
  color: var(--gold);
  margin-bottom: 16px;
}

.thank-you-icon svg { width: 100%; height: 100%; }

/* -------------------- Book viewer -------------------- */

.book-frame-wrap {
  position: absolute;
  top: var(--header-total);
  left: 0;
  right: 0;
  bottom: var(--tab-bar-total);
  background: var(--navy-deep);
}

.book-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* -------------------- Bottom tab bar -------------------- */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--tab-bar-total);
  background: var(--navy);
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 20;
  padding-bottom: var(--safe-bottom);
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--slate-light);
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
}

.tab-btn .tab-icon {
  width: 20px;
  height: 20px;
}

.tab-btn.active {
  color: var(--gold);
}

/* -------------------- Install banner -------------------- */

.install-banner {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(var(--tab-bar-total) + 10px);
  width: calc(100% - 24px);
  max-width: 456px;
  background: var(--navy);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 30;
}

.install-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.install-copy { flex: 1; min-width: 0; }

.install-title {
  color: var(--white);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 3px;
}

.install-body {
  color: var(--gold-soft);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.install-btn {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.install-dismiss {
  background: none;
  border: none;
  color: var(--slate-light);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

.install-panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: calc(var(--safe-top) + 16px) 12px calc(var(--tab-bar-total) + 20px);
  background: rgba(12, 20, 34, 0.48);
}

.install-panel {
  position: relative;
  width: min(100%, 456px);
  max-height: calc(100vh - var(--header-total) - var(--tab-bar-total) - 40px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid rgba(30, 45, 69, 0.14);
  border-radius: 14px;
  padding: 24px 18px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  outline: none;
}

.install-panel:focus-visible,
.install-panel button:focus-visible,
.install-btn:focus-visible {
  outline: 3px solid rgba(202, 166, 87, 0.55);
  outline-offset: 3px;
}

.install-panel-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(30, 45, 69, 0.08);
  color: var(--navy);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.install-panel-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: block;
  margin-bottom: 14px;
}

.install-panel-kicker {
  margin: 0 0 5px;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.install-panel-title {
  margin: 0 36px 8px 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.18;
}

.install-panel-body,
.install-panel-note,
.install-panel-status {
  margin: 0;
  color: var(--slate);
  font-size: 14px;
  line-height: 1.5;
}

.install-panel-note,
.install-panel-status {
  margin-top: 10px;
}

.install-panel-status {
  color: var(--navy);
  font-weight: 700;
}

.install-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.install-panel-primary,
.install-panel-secondary {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
}

.install-panel-primary {
  border: none;
  background: var(--gold);
  color: var(--navy-deep);
}

.install-panel-primary:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.install-panel-secondary {
  border: 1px solid rgba(30, 45, 69, 0.24);
  background: var(--white);
  color: var(--navy);
}

@media (max-width: 380px) {
  .install-panel-actions {
    flex-direction: column;
  }

  .install-panel-primary,
  .install-panel-secondary {
    width: 100%;
  }
}

/* -------------------- Empty state -------------------- */

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--slate);
  font-size: 14px;
}

/* -------------------- Utility -------------------- */

.ext-link-hint {
  font-size: 12px;
  color: var(--slate-light);
  padding: 0 20px 20px;
}
