/* ============================================================
   WheelsUp — Main Stylesheet
   Palette: orange primary, sky blue accent, clean white
   ============================================================ */

:root {
  --orange:      #f97316;
  --orange-dark: #ea6a0a;
  --orange-light:#fff7ed;
  --orange-muted:#fed7aa;
  --blue:        #0ea5e9;
  --blue-light:  #e0f2fe;
  --green:       #22c55e;
  --green-light: #dcfce7;
  --yellow:      #eab308;
  --yellow-light:#fefce8;
  --red:         #ef4444;
  --red-light:   #fee2e2;
  --gray-50:     #f8fafc;
  --gray-100:    #f1f5f9;
  --gray-200:    #e2e8f0;
  --gray-400:    #94a3b8;
  --gray-600:    #475569;
  --gray-800:    #1e293b;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-50);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

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

img { max-width: 100%; }


/* ── Layout ─────────────────────────────────────────────── */

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.page-body {
  padding: 2rem 0 4rem;
}


/* ── Nav ─────────────────────────────────────────────────── */

.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--orange);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
}

.nav-logo:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
}

.nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-link-muted { color: var(--text-muted); font-size: .875rem; }
.nav-btn-register {
  background: var(--orange); color: #fff !important;
  padding: .4rem .9rem; border-radius: 6px; font-size: .875rem; font-weight: 600;
}
.nav-btn-register:hover { background: #ea6a0a; text-decoration: none; }

.nav-account-link {
  display: flex; align-items: center; gap: .5rem;
  color: var(--text-muted); font-size: .875rem; font-weight: 500;
}
.nav-account-link:hover { color: var(--text); text-decoration: none; }
.nav-account-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}


/* ── Buttons ────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: scale(0.98); }
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--orange);
  color: #fff;
}
.btn-primary:hover { background: var(--orange-dark); }

.btn-secondary {
  background: var(--gray-100);
  color: var(--gray-800);
}
.btn-secondary:hover { background: var(--gray-200); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--text); }

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ── Cards ──────────────────────────────────────────────── */

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-sm {
  padding: 1rem;
}

.card + .card { margin-top: 1rem; }


/* ── Forms ──────────────────────────────────────────────── */

.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.4rem;
}

.form-label .required { color: var(--red); margin-left: 2px; }

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,.12);
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-input::placeholder,
.form-select::placeholder,
.form-textarea::placeholder { color: #b0bec5; font-style: italic; }

.form-input.input-lg { padding: 0.875rem 1rem; font-size: 1.0625rem; }

.form-error {
  font-size: 0.8125rem;
  color: var(--red);
  margin-top: 0.3rem;
}


/* ── Trip type selector ─────────────────────────────────── */

.trip-type-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trip-type-option {
  display: none;
}

.trip-type-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-width: 80px;
  background: #fff;
  user-select: none;
}

.trip-type-label:hover {
  border-color: var(--orange-muted);
  background: var(--orange-light);
}

.trip-type-option:checked + .trip-type-label {
  border-color: var(--orange);
  background: var(--orange-light);
}

.trip-type-icon { font-size: 1.75rem; line-height: 1; }
.trip-type-text { font-size: 0.75rem; font-weight: 600; color: var(--gray-600); }


/* ── Calendar ───────────────────────────────────────────── */

.calendar {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
}

.calendar-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0;
  letter-spacing: 0.05em;
}

/* Respond calendar (toggle cells) */
.cal-day {
  position: relative;
  padding: 0;
}

.cal-day-btn {
  width: 100%;
  aspect-ratio: 1;
  min-height: 44px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cal-day-btn:hover {
  border-color: var(--red);
  background: var(--red-light);
}

.cal-day-btn.blocked {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.cal-day-btn.blocked:hover {
  background: #dc2626;
}

.cal-day-btn.outside-window {
  opacity: 0.35;
  pointer-events: none;
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-400);
}

.cal-day-empty {
  /* Padding cell for days before/after month */
}

/* Heat map calendar (organizer view) */
.cal-day-heat {
  width: 100%;
  aspect-ratio: 1;
  min-height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: default;
  position: relative;
  transition: transform 0.1s;
}

.cal-day-heat:hover { transform: scale(1.05); }
.cal-day-heat.no-data { background: var(--gray-100); color: var(--gray-400); border: 1px solid var(--gray-200); }
.cal-day-heat.pct-100 { background: #16a34a; color: #fff; }
.cal-day-heat.pct-75  { background: #4ade80; color: #166534; }
.cal-day-heat.pct-50  { background: #fde047; color: #713f12; }
.cal-day-heat.pct-25  { background: #fb923c; color: #7c2d12; }
.cal-day-heat.pct-0   { background: var(--red); color: #fff; }

.cal-day-heat .heat-num {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.85;
  line-height: 1;
}

.cal-day-heat .heat-day {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Window highlight border */
.cal-day-heat.in-window {
  box-shadow: 0 0 0 2px var(--orange);
}

.cal-day-heat.window-start { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: var(--radius-sm); }
.cal-day-heat.window-end   { border-top-right-radius: var(--radius-sm); border-bottom-right-radius: var(--radius-sm); }


/* ── Best windows list ──────────────────────────────────── */

.window-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
}

.window-option:hover {
  border-color: var(--orange);
  background: var(--orange-light);
}

.window-option.best {
  border-color: var(--green);
  background: var(--green-light);
}

.window-score {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 800;
  flex-shrink: 0;
}

.score-high   { background: var(--green);  color: #fff; }
.score-medium { background: var(--yellow); color: var(--gray-800); }
.score-low    { background: var(--red);    color: #fff; }

.window-dates {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.window-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.window-choose-btn {
  margin-left: auto;
  flex-shrink: 0;
}


/* ── Invitee status row ──────────────────────────────────── */

.invitee-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.invitee-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: #fff;
}

.invitee-chip.responded {
  border-color: var(--green);
  background: var(--green-light);
  color: #166534;
}

.invitee-chip.pending {
  border-color: var(--border);
  color: var(--text-muted);
}

.invitee-chip.declined {
  border-color: var(--red-light);
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.6;
}

.invitee-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.invitee-chip.responded .invitee-dot { background: var(--green); }
.invitee-chip.pending   .invitee-dot { background: var(--gray-400); }
.invitee-chip.declined  .invitee-dot { background: var(--red); }

.invitee-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0 0 0.125rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.invitee-chip:hover .invitee-remove { opacity: 0.6; }
.invitee-chip:hover .invitee-remove:hover { opacity: 1; color: var(--red); }


/* ── Event cards ────────────────────────────────────────── */

.event-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

.event-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  line-height: 1;
}

.event-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.event-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.event-link {
  font-size: 0.8125rem;
  color: var(--orange);
}


/* ── Section header ─────────────────────────────────────── */

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.875rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}


/* ── Page header (proposal dashboard) ──────────────────── */

.proposal-hero {
  background: linear-gradient(135deg, var(--orange-light) 0%, #fff7ed 100%);
  border-bottom: 1px solid var(--orange-muted);
  padding: 1.75rem 0 1.5rem;
}

.proposal-title {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.proposal-meta {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.proposal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-collecting { background: var(--blue-light); color: #0369a1; }
.badge-decided    { background: var(--green-light); color: #166534; }


/* ── Grid layout (dashboard) ────────────────────────────── */

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 760px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}


/* ── Respond page ───────────────────────────────────────── */

.respond-header {
  text-align: center;
  padding: 2rem 1rem 1rem;
}

.respond-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.respond-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.tap-hint {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.tap-hint strong { color: var(--red); }


/* ── Hero (landing page) ────────────────────────────────── */

.hero {
  background: linear-gradient(160deg, #fff7ed 0%, #e0f2fe 100%);
  padding: 5rem 1rem 4rem;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1.1;
  max-width: 640px;
  margin: 0 auto;
}

.hero-title span { color: var(--orange); }

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: 1.25rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-proof {
  margin-top: 1.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}


/* ── Feature grid (landing) ─────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  padding: 3rem 1rem;
}

.feature-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: left;
}

.feature-emoji {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}


/* ── Toast notification ─────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--gray-800);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: auto;
}

.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }


/* ── Alert / share banner ───────────────────────────────── */

.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin-bottom: 1.25rem;
}

.alert-success { background: var(--green-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-info    { background: var(--blue-light); color: #0369a1; border: 1px solid #bae6fd; }
.alert-warning { background: var(--yellow-light); color: #92400e; border: 1px solid #fde68a; }

.alert-icon { font-size: 1.1rem; flex-shrink: 0; }

.copy-link-box {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.copy-link-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  background: #fff;
  color: var(--text-muted);
  font-family: monospace;
  outline: none;
}

.copy-link-input:focus { border-color: var(--orange); }


/* ── Progress / loading ─────────────────────────────────── */

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-muted);
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.loading-spinner-dark {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}


/* ── Divider ────────────────────────────────────────────── */

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}


/* ── Utility ────────────────────────────────────────────── */

.text-muted { color: var(--text-muted); }
.text-sm    { font-size: 0.875rem; }
.text-xs    { font-size: 0.75rem; }
.text-center { text-align: center; }
.font-bold  { font-weight: 700; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.ml-auto { margin-left: auto; }


/* ── Mobile tweaks ──────────────────────────────────────── */

@media (max-width: 480px) {
  .btn-lg { width: 100%; }
  .trip-type-label { min-width: 60px; padding: 0.6rem 0.5rem; }
  .trip-type-icon { font-size: 1.5rem; }
}
