/* Netherlands Day Trip Planner Styles */

:root {
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #222;
  --muted: #666;
  --border: #e5e7eb;
  --primary: #0b6bdb;
  --primary-600: #0a5cc2;
  --success: #28a745;
  --danger: #dc3545;
  --info: #17a2b8;
  --accent: #6f42c1;
}

* { box-sizing: border-box; }
body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
  margin: 0;
  padding: 20px;
  background: var(--bg);
  color: var(--text);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  padding: 20px 24px;
  border: 1px solid var(--border);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: 0.2px; }
.brand .flag { font-size: 22px; }
.brand span { font-size: 20px; }
.top-links a {
  color: var(--muted);
  text-decoration: underline;
  font-weight: 600;
  padding: 6px 10px;
}
.top-links a:hover {
  color: var(--text);
}
.top-links a svg { border: none; padding: 0; }
.top-links a:has(svg) { border: none; padding: 6px; }
.top-links a:has(svg):hover { border: none; }

h1 {
  text-align: center;
  color: var(--text);
  margin: 8px 0 20px;
  font-size: 28px;
}
.subtitle { text-align: center; color: var(--muted); margin-top: -8px; margin-bottom: 22px; }

.trip-form {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  align-items: flex-start;
  padding: 16px;
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  border-radius: 12px;
}
.form-group { display: flex; flex-direction: column; }
label { font-weight: 700; margin-bottom: 6px; color: var(--text); }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

.input-row { display: flex; gap: 10px; align-items: center; position: relative; }
input[type="text"] {
  padding: 6px 8px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.2;
  height: 36px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 200px;
  flex: 0 0 auto;
}
input[type="text"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

input[type="time"] {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  width: 140px;
  flex: 0 0 auto;
  background: var(--card);
  color: var(--text);
}
input[type="time"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }

/* Time dropdown selects */
.time-selects { display: inline-flex; align-items: center; gap: 6px; }
.time-selects select {
  padding: 6px 8px; /* more compact than text inputs */
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 14px; /* slightly smaller text to reduce visual weight */
  line-height: 1.2;
  background: var(--card);
  color: var(--text);
  height: 36px; /* compact height so the group looks smaller than From/To */
}
.time-selects select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.time-colon { color: var(--muted); font-weight: 600; font-size: 14px; }

.chips { display: inline-flex; gap: 8px; align-items: center; }
.chip { padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .2px; border: 1px solid var(--border); }
.chip.from { background: color-mix(in srgb, #007bff 10%, transparent); color: #007bff; border-color: color-mix(in srgb, #007bff 50%, transparent); }
.chip.to { background: color-mix(in srgb, #ff8c00 10%, transparent); color: #ff8c00; border-color: color-mix(in srgb, #ff8c00 50%, transparent); }
.chip.plan { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

.content-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.map-container {
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  border-radius: 12px;
  height: 520px;
  overflow: hidden;
}
#map { height: 100%; width: 100%; }

.results-section {
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  border-radius: 12px;
  padding: 20px;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}
.muted { color: var(--muted); font-style: italic; font-weight: 500; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1.5px solid var(--primary); background: var(--primary); color: #fff; border-radius: 10px; cursor: pointer; font-weight: 700; box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 35%, transparent); }
.btn:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.btn-compact { 
  padding: 6px 8px; 
  font-size: 18px; 
  min-width: 40px; 
  height: 36px;
  gap: 0; 
  background: #f5f5f5; 
  border: 1.5px solid #888; 
  color: #333; 
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn-compact:hover { 
  background: #e8e8e8; 
  border-color: #666; 
}

.status { font-size: 14px; color: var(--muted); }

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

.spinner {
  display: inline-block;
  animation: spin 1s linear infinite;
}

/* Train animation styles */
.train-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
  font-weight: 600;
  color: var(--text);
}

.train-track {
  position: relative;
  width: 200px;
  height: 4px;
  background: linear-gradient(to right, #ccc 0%, #ccc 48%, transparent 48%, transparent 52%, #ccc 52%, #ccc 100%);
  background-size: 20px 4px;
  border-radius: 2px;
}

.train {
  position: absolute;
  top: -8px;
  font-size: 18px;
  animation: trainMove 2s linear infinite;
}

.train.stopped {
  animation: none;
  left: calc(50% - 10px);
}

@keyframes trainMove {
  0% { left: -20px; }
  50% { left: calc(100% - 10px); }
  100% { left: -20px; }
}

.station-label {
  font-size: 14px;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
}

/* Mobile message styles */
.mobile-message {
  display: none;
  text-align: center;
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  margin: 8px 0;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  border-radius: 8px;
}

/* Responsive styles */
@media (max-width: 1000px) {
  .mobile-message {
    display: block;
  }
}

@media (max-width: 900px) {
  .trip-form { flex-direction: column; }
  .content-area { grid-template-columns: 1fr; }
  .map-container { height: 360px; }
  .results-section { min-height: 360px; }
}

/* Specific element styles previously inline */
.how-to-heading {
  margin-top: 0;
  color: var(--text);
}

.how-to-content {
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
}

.how-to-emphasis {
  margin-top: 20px;
}

.disclaimer {
  margin-top: 20px;
  padding: 16px;
  background: color-mix(in srgb, var(--card) 70%, var(--bg));
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.disclaimer a {
  color: var(--primary);
}

/* About page styles */
.about-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.about-section {
  margin-bottom: 32px;
}

.about-section h2 {
  color: var(--text);
  margin-bottom: 16px;
  font-size: 22px;
  font-weight: 700;
}

.about-section p {
  line-height: 1.6;
  margin-bottom: 16px;
  color: var(--text);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
  color: var(--text);
}

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

.about-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px solid var(--border);
  text-align: center;
}

.about-footer p {
  font-size: 18px;
  color: var(--muted);
}

img {
  width: 100%;
  height: auto;
}