/* LetsConnect Abstracts — custom styles */
/* Brand palette: sky blue #20AADD, mint #96FBE6, raspberry CTA #E13758, dark navy #1a2b5e, white #ffffff */

:root {
  --color-primary: #20AADD;
  --color-primary-light: #4FBEE6;
  --color-primary-dark: #1593C2;
  --color-accent: #96FBE6;
  --color-accent-dark: #5fe7cf;
  --color-cta: #E13758;
  --color-cta-dark: #c52f4c;
  --color-navbar: #1a2b5e;
  --color-text: #222222;
  --color-text-muted: #6b7280;
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-success: #059669;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-info: #2563eb;
  --radius: 0.5rem;
}

/* ── Skip link (accessibility) ─────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.25rem;
  background: var(--color-navbar);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 9999;
  border-radius: 0 0 var(--radius) 0;
  text-decoration: none;
  transition: top 0.1s;
}
.skip-link:focus { top: 0; outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ── Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dark); text-decoration: underline; }

/* ── Navbar ───────────────────────────────────────────── */
.navbar {
  background: var(--color-navbar);
  color: white;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar-logo img { height: 40px; }
.navbar-logo svg { height: 40px; }

.navbar-nav {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar-nav a {
  color: rgba(255,255,255,0.9);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.15s;
  text-decoration: none;
}

.navbar-nav a:hover, .navbar-nav a.active, .navbar-nav a[aria-current="page"] {
  background: rgba(255,255,255,0.18);
  color: white;
  text-decoration: none;
}

.navbar-nav a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.navbar-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Username display — contrast-safe on navy background */
.navbar-user { color: rgba(255,255,255,0.85); font-size: 0.85rem; }

/* Mobile nav — hidden at all sizes by default; shown only on mobile when .open is toggled */
.mobile-nav { display: none; }

/* Hamburger button */
.navbar-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: white;
  border-radius: var(--radius);
  transition: background 0.15s;
}
.navbar-hamburger:hover { background: rgba(255,255,255,0.15); }
.navbar-hamburger:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.navbar-hamburger svg { display: block; width: 24px; height: 24px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--color-primary); color: white; }
.btn-primary:hover { background: var(--color-primary-dark); color: white; text-decoration: none; }

/* Key call-to-action (e.g. Save / Submit Abstract) — raspberry brand accent */
.btn-cta { background: var(--color-cta); color: white; }
.btn-cta:hover { background: var(--color-cta-dark); color: white; text-decoration: none; }

.btn-secondary { background: var(--color-accent); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-accent-dark); color: var(--color-text); text-decoration: none; }

.btn-outline { background: transparent; color: var(--color-primary); border: 2px solid var(--color-primary); }
.btn-outline:hover { background: var(--color-primary); color: white; text-decoration: none; }

.btn-danger { background: var(--color-danger); color: white; }
.btn-danger:hover { background: #b91c1c; color: white; text-decoration: none; }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 1.75rem; font-size: 1rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 2px; }
.btn-cta:focus-visible, .btn-danger:focus-visible { outline-color: var(--color-cta); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.card-title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); margin: 0; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--color-text); }
.form-help { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--color-danger); margin-top: 0.3rem; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--color-text);
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus, .select:focus, .textarea:focus {
  outline: 3px solid var(--color-primary);
  outline-offset: 1px;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(32,170,221,0.18);
}

.input.error, .select.error, .textarea.error { border-color: var(--color-danger); }

.input:disabled, .select:disabled, .textarea:disabled { background: #f3f4f6; color: var(--color-text-muted); cursor: not-allowed; }

/* ── Badges / Status ────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-draft       { background: #f3f4f6; color: #6b7280; }
.badge-submitted   { background: #dbeafe; color: #1d4ed8; }
.badge-under_review { background: #fef3c7; color: #92400e; }
.badge-waiting_clarification { background: #fce7f3; color: #9d174d; }
.badge-approved    { background: #d1fae5; color: #065f46; }
.badge-declined    { background: #fee2e2; color: #991b1b; }
.badge-open        { background: #d1fae5; color: #065f46; }
.badge-closed      { background: #fef3c7; color: #92400e; }
.badge-archived    { background: #f3f4f6; color: #6b7280; }
.badge-upcoming    { background: #dbeafe; color: #1d4ed8; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  border-left: 4px solid;
}
.alert-success { background: #d1fae5; border-color: var(--color-success); color: #065f46; }
.alert-warning { background: #fef3c7; border-color: var(--color-warning); color: #78350f; }
.alert-error   { background: #fee2e2; border-color: var(--color-danger); color: #7f1d1d; }
.alert-info    { background: #dbeafe; border-color: var(--color-info); color: #1e3a8a; }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { background: #f9fafb; padding: 0.65rem 1rem; text-align: left; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); border-bottom: 2px solid var(--color-border); }
td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--color-border); vertical-align: top; }
tr:hover td { background: #f9fafb; }

/* ── Layout ──────────────────────────────────────────────── */
.page-wrapper { display: flex; flex: 1; }

.sidebar {
  width: 220px;
  min-height: calc(100vh - 64px);
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  flex-shrink: 0;
}

.sidebar-section { margin-bottom: 1.5rem; }
.sidebar-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-text-muted); font-weight: 700; padding: 0 0.5rem; margin-bottom: 0.4rem; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
  margin-bottom: 0.1rem;
}

.sidebar-link:hover { background: #f3f4f6; text-decoration: none; color: var(--color-primary); }
.sidebar-link.active { background: rgba(32,170,221,0.1); color: var(--color-primary); font-weight: 700; border-left: 3px solid var(--color-primary); padding-left: calc(0.75rem - 3px); }
.sidebar-link:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

.main-content { flex: 1; padding: 2rem; max-width: 1200px; }

.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); margin: 0 0 0.25rem; }
.page-subtitle { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* ── Quote banner (submitters & reviewers only) ──────────── */
.quote-banner {
  background: rgba(32,170,221,0.07);
  border-bottom: 1px solid rgba(32,170,221,0.2);
  padding: 0.6rem 1.5rem;
}

.quote-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

.quote-banner-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}

.quote-banner-text {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 0;
  flex: 1;
  line-height: 1.4;
}

.quote-banner-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .quote-banner-author { display: none; }
}

/* ── Quill editor ────────────────────────────────────────── */
.quill-container { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.quill-container .ql-toolbar { border: none; border-bottom: 1px solid var(--color-border); }
.quill-container .ql-container { border: none; font-size: 0.95rem; min-height: 220px; }

.word-counter {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.word-counter.over-limit { color: var(--color-danger); font-weight: 600; }

/* ── Vote stars ───────────────────────────────────────────── */
.vote-radio { display: none; }
.star-rating { display: flex; gap: 0.25rem; flex-direction: row-reverse; justify-content: flex-end; }
.star-rating label {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color 0.1s;
}
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--color-cta); }

/* ── Speaker image preview ────────────────────────────────────── */
.img-preview { width: 100px; height: 100px; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--color-border); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { padding: 1rem; }
  .navbar-nav { display: none; }
  .navbar-hamburger { display: flex; align-items: center; justify-content: center; }

  /* Mobile nav drawer */
  .mobile-nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-navbar);
    padding: 0.75rem 1rem 1rem;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-nav.open { display: block; }
  .mobile-nav a, .mobile-nav button[type="submit"] {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    color: rgba(255,255,255,0.9);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    transition: background 0.15s;
  }
  .mobile-nav a:hover, .mobile-nav button[type="submit"]:hover { background: rgba(255,255,255,0.1); color: white; }
  .mobile-nav a:focus-visible, .mobile-nav button[type="submit"]:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
  .mobile-nav-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 0.4rem 0; }
  .mobile-nav-user { padding: 0.5rem 1rem; font-size: 0.82rem; color: rgba(255,255,255,0.55); }

  /* Touch-friendly form inputs */
  .input, .select, .textarea { min-height: 44px; }
  .btn-sm { min-height: 44px; padding: 0.4rem 0.85rem; }

  /* Hero text adjustments */
  .hero-title { font-size: 2rem; }
  .hero::after { height: 40px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* ── Accessibility: reduced motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
  }
  .skip-link { transition: none; }
}

/* ── Hero (home page) ────────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, var(--color-navbar) 0%, #1e3a7a 40%, var(--color-primary) 100%);
  color: white;
  padding: 5.5rem 2rem 6.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--color-bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero-eyebrow {
  display: inline-block;
  background: rgba(150,251,230,0.2);
  color: var(--color-accent);
  border: 1px solid rgba(150,251,230,0.4);
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  margin-bottom: 1.25rem;
}

.hero-title { font-size: 2.75rem; font-weight: 900; margin: 0 0 1rem; line-height: 1.15; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.9; max-width: 560px; margin: 0 auto 2rem; line-height: 1.6; }

/* ── Utility ──────────────────────────────────────────────── */
.text-muted { color: var(--color-text-muted); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-success); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.w-full { width: 100%; }
.separator { border: none; border-top: 1px solid var(--color-border); margin: 1.5rem 0; }

/* ── Step icon cards (home page) ─────────────────────────────── */
.step-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(32,170,221,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}
.step-icon svg { width: 28px; height: 28px; color: var(--color-primary); }

/* ── Checkbox list (locations) ────────────────────────────────── */
.checkbox-list { display: flex; flex-direction: column; gap: 0.5rem; }
.checkbox-list label { display: flex; align-items: center; gap: 0.5rem; font-weight: normal; cursor: pointer; }
.checkbox-list input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--color-primary); }

/* ── Additional speaker toggle ────────────────────────────────── */
.additional-speaker-section { border: 1px dashed var(--color-border); border-radius: var(--radius); padding: 1.25rem; margin-top: 1rem; background: #f9fafb; }
