/* ============================================================
   style.css – global styles used on every page.
   Colours and spacing live in :root variables so the whole
   site can be re-themed by changing a few lines.
   ============================================================ */

:root {
  --primary: #0b6e8a;        /* teal-blue: trust, travel */
  --primary-dark: #08566d;
  --accent: #f28c28;         /* warm orange for highlights */
  --text: #1f2937;
  --text-muted: #6b7280;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --border: #e5e7eb;
  --danger: #b91c1c;
  --success: #15803d;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  --space: 1rem;
}

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

body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 var(--space); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  text-align: center;
  transition: background 0.2s;
}
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; font-size: 0.95rem; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;           /* 16px stops iOS zooming into inputs */
  font-family: inherit;
  background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: 2px solid var(--primary);
  border-color: transparent;
}

/* ---------- Messages (errors / success) ---------- */
.message { padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: 0.95rem; }
.message[hidden] { display: none; }
.message-error { background: #fee2e2; color: var(--danger); }
.message-success { background: #dcfce7; color: var(--success); }
.message-info { background: #e0f2fe; color: var(--primary-dark); }

/* ---------- Demo notice ---------- */
.demo-note { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 1rem; }

/* ---------- Simple page header (Phase 2 replaces this with the full navbar) ---------- */
.simple-header { background: var(--surface); box-shadow: var(--shadow); }
.simple-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.logo:hover { text-decoration: none; }

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }

/* ---------- Safety-net banner (js/error-banner.js) ---------- */
.error-banner {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: calc(100% - 2rem);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: #7f1d1d;
  color: #fff;
  font-size: 0.92rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.error-banner button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Keyboard focus: a clear outline for people who do not use a mouse ---------- */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
