/* ====== Accessible Red-White-Blue Theme (Senior-Friendly) ====== */
:root {
  /* Palette */
  --blue-900: #0d47a1;   /* primary blue (headers/CTA) */
  --blue-700: #1565c0;   /* hover blue */
  --blue-50:  #e3f2fd;   /* subtle blue background */
  --red-700:  #c62828;   /* primary red (accents/errors) */
  --red-600:  #d32f2f;   /* hover red */
  --neutral-900: #0f172a; /* near-black for text */
  --neutral-800: #1e293b;
  --neutral-700: #334155;
  --neutral-100: #f8fafc; /* white-ish BG */
  --white: #ffffff;

  /* Typography & sizing */
  --base-font-size: 18px;      /* larger base for readability */
  --line-height: 1.7;
  --radius-md: 14px;
  --radius-lg: 18px;

  /* Borders & shadows */
  --border: 1.5px solid rgba(13, 71, 161, 0.25);
  --shadow-md: 0 10px 30px rgba(13, 71, 161, 0.12);
  --focus-ring: 0 0 0 3px rgba(21, 101, 192, 0.25);

  /* Controls */
  --control-padding: 16px 18px;
  --btn-padding: 16px 22px;
}

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

/* Body */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, "Noto Sans", sans-serif;
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(21,101,192,0.12), transparent 50%),
    radial-gradient(1000px 700px at 80% 0%, rgba(198,40,40,0.10), transparent 50%),
    linear-gradient(180deg, var(--neutral-100) 0%, #ffffff 100%);
  color: var(--neutral-900);
  min-height: 100vh;
  line-height: var(--line-height);
  font-size: var(--base-font-size);
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 28px;
  padding: 28px 0 12px;
}

.logo h1 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--blue-900);
  letter-spacing: 0.2px;
  margin-bottom: 6px;
}

.logo p {
  font-size: 1.05rem;
  color: var(--neutral-700);
}

/* Layout */
.main-content {
  display: flex;
  justify-content: center;
}

/* Card */
.booking-section {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 720px;
  box-shadow: var(--shadow-md);
}

.booking-section h2 {
  font-size: 1.6rem;
  color: var(--blue-900);
  margin-bottom: 6px;
  text-align: center;
  font-weight: 800;
}

.subtitle {
  text-align: center;
  color: var(--neutral-700);
  margin-bottom: 20px;
  font-size: 1.05rem;
}

/* Form */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

label {
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--neutral-900);
  font-size: 1.02rem;
}

/* Inputs */
input, select, textarea {
  padding: var(--control-padding);
  border: 2px solid rgba(13, 71, 161, 0.25);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--neutral-900);
  font-size: 1.02rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue-900);
  box-shadow: var(--focus-ring);
  background: #ffffff;
}

input::placeholder, textarea::placeholder {
  color: var(--neutral-700);
}

select option {
  background: #ffffff;
  color: var(--neutral-900);
}

/* Location group */
.location-group { position: relative; }

.location-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

/* Buttons */
.btn-secondary,
.location-btn,
.modal-btn,
.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-padding);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

/* Primary action (Blue) */
.submit-btn,
.btn-secondary {
  background: var(--blue-900);
  color: #ffffff;
}
.submit-btn:hover,
.btn-secondary:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(13, 71, 161, 0.25);
}
.submit-btn:active,
.btn-secondary:active {
  transform: translateY(0);
}

/* Location quick actions (also blue by default) */
.location-btn {
  background: var(--blue-900);
  color: #ffffff;
}
.location-btn:hover {
  background: var(--blue-700);
  transform: translateY(-1px);
}

/* Emphasis/alert (Red) */
.modal-btn,
.modal-content.error .modal-btn {
  background: var(--red-700);
  color: #ffffff;
}
.modal-btn:hover {
  background: var(--red-600);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Loader in button */
.btn-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
  margin-right: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Map */
.map-container {
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(13, 71, 161, 0.25);
  position: relative;
}
.leaflet-container { background: var(--blue-50); }

/* Leaflet controls */
.leaflet-control-zoom a {
  background: var(--blue-900);
  color: #ffffff;
  border: none;
}
.leaflet-control-zoom a:hover { background: var(--blue-700); }

/* Leaflet popup */
.leaflet-popup-content-wrapper {
  background: #ffffff;
  color: var(--neutral-900);
  border-radius: 12px;
  border: 1px solid rgba(13, 71, 161, 0.25);
}
.leaflet-popup-tip {
  background: #ffffff;
  border: 1px solid rgba(13, 71, 161, 0.25);
}

/* Modal overlay */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(2, 6, 23, 0.55);
  display: flex; justify-content: center; align-items: center;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

/* Modal card */
.modal-content {
  background: #ffffff;
  padding: 32px;
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: 440px;
  width: 92%;
  border: 2px solid rgba(13, 71, 161, 0.25);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.25);
}

.modal-content.error {
  border-color: var(--red-700);
}

.success-icon, .error-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.modal-content h3 {
  color: var(--blue-900);
  margin-bottom: 10px;
  font-size: 1.4rem;
  font-weight: 900;
}

.modal-content.error h3 { color: var(--red-700); }

.modal-content p {
  color: var(--neutral-800);
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 1.05rem;
}

/* Responsive refinements */
@media (max-width: 768px) {
  .container { padding: 16px; }
  .booking-section { padding: 20px; }
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .map-container { height: 280px; }
  .logo h1 { font-size: 1.9rem; }
}

@media (max-width: 480px) {
  .booking-section { padding: 18px; }
  .modal-content { padding: 24px; margin: 16px; }
}
