/* ============================================================
   biletalarmı — Araçlar ortak stilleri
   v4.css token'larına bağlıdır (--bg, --surface, --accent vb.)
   ============================================================ */

/* ── Genel layout ─────────────────────────────────────────── */
.aract-main {
  padding: 48px 0 80px;
}

/* ── Breadcrumb ──────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb span {
  color: var(--border);
}

/* ── Başlık ve lead ──────────────────────────────────────── */
.aract-h1 {
  font-family: 'Instrument Serif', Geist, serif;
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.aract-lead {
  font-size: 19px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 36px;
  max-width: 720px;
}

/* ── Tool card ───────────────────────────────────────────── */
.tool-card {
  padding: 28px 24px;
  border-radius: 20px;
  margin-bottom: 48px;
}

/* ── Tool row ────────────────────────────────────────────── */
.tool-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: flex-end;
}
.tool-row .input,
.tool-row select {
  flex: 1;
  min-width: 140px;
}
.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.input-group label {
  font-size: 13px;
  color: var(--muted);
}

/* ── Sonuç grid (kac-saat-surur) ─────────────────────────── */
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.result-card {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 20px 16px;
  border: 1px solid var(--border);
}

.rc-icon {
  font-size: 30px;
  margin-bottom: 8px;
}
.rc-type {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rc-sure {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0;
}
.rc-fiyat {
  font-size: 15px;
  color: var(--text);
}
.rc-extra {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.no-route {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ── İndirim hesaplayıcı ─────────────────────────────────── */
.indirim-grup {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 16px;
}
.indirim-grup legend {
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 15px;
}
.radio-label input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.result-box {
  margin-top: 20px;
  background: var(--surface-2);
  border-radius: 14px;
  padding: 24px;
  border: 1px solid var(--border);
}
.price-main {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 12px;
}
.currency {
  font-size: 28px;
  font-weight: 400;
}
.price-detail p {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
}
.disclaimer {
  font-size: 12px !important;
  opacity: 0.7;
  margin-top: 8px !important;
}

.indirim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin-top: 12px;
}
.indirim-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.indirim-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}
.indirim-table tr:last-child td {
  border-bottom: none;
}

/* ── En yakın istasyon ───────────────────────────────────── */
.location-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.or-divider {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0;
  position: relative;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  padding: 0 24px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 200ms;
  text-decoration: none;
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.loading-state {
  text-align: center;
  padding: 32px;
  color: var(--muted);
}
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.station-results {
  margin-top: 20px;
}
.station-results h3 {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 12px;
}

.station-card {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sc-name {
  font-weight: 600;
  font-size: 16px;
}
.sc-city {
  font-size: 13px;
  color: var(--muted);
}
.sc-distance {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  text-align: right;
}
.sc-km {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}

.error-msg {
  padding: 16px 20px;
  text-align: center;
  color: var(--accent-3);
  background: color-mix(in srgb, var(--accent-3) 10%, transparent);
  border-radius: 12px;
  font-size: 14px;
  margin-top: 12px;
}

/* ── Vagon planı ─────────────────────────────────────────── */
.vagon-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tab-btn {
  height: 40px;
  padding: 0 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 180ms;
}
.tab-btn.active,
.tab-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.seat-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.seat-input-row label {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.vagon-wrap {
  margin-bottom: 16px;
}

.vagon-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

.highlight-info {
  margin-top: 14px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 10px;
  border: 1px solid var(--accent);
  font-size: 14px;
  color: var(--text);
}

/* ── Karbon hesaplayıcı ──────────────────────────────────── */
.karbon-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.karbon-card {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 20px 14px;
  border: 1px solid var(--border);
  text-align: center;
  transition: border-color 200ms, box-shadow 200ms;
}
.karbon-card.best-card {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-2) 30%, transparent);
}
.kc-icon {
  font-size: 34px;
  margin-bottom: 8px;
}
.kc-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.kc-co2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
.kc-agac {
  font-size: 12px;
  color: var(--muted);
}
.karbon-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── İçerik bölümü ───────────────────────────────────────── */
.aract-content {
  max-width: 720px;
  margin: 0 0 48px;
}
.aract-content h2 {
  font-size: 24px;
  margin: 28px 0 10px;
  line-height: 1.2;
}
.aract-content p,
.aract-content li {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 10px;
  font-size: 16px;
}
.aract-content ul {
  padding-left: 20px;
}

/* ── FAQ ─────────────────────────────────────────────────── */
.aract-faq {
  max-width: 720px;
  margin-bottom: 48px;
}
.aract-faq h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

details.faq {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
details.faq summary {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 150ms;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: '+';
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}
details.faq[open] summary::after { content: '−'; }
details.faq summary:hover { background: var(--surface-2); }
details.faq p {
  padding: 0 18px 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* ── CTA ─────────────────────────────────────────────────── */
.aract-cta {
  padding: 32px;
  text-align: center;
  border-radius: 20px;
  margin-top: 8px;
}
.aract-cta h2 {
  font-size: 22px;
  margin-bottom: 10px;
}
.aract-cta p {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 15px;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  margin-top: 48px;
  font-size: 14px;
  color: var(--muted);
}
.footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer nav {
  display: flex;
  gap: 20px;
}
.footer nav a {
  color: var(--muted);
  text-decoration: none;
}
.footer nav a:hover { color: var(--accent); }

/* ── Mobil ───────────────────────────────────────────────── */
@media (max-width: 600px) {
  .aract-main { padding: 32px 0 60px; }
  .tool-row { flex-direction: column; }
  .result-grid { grid-template-columns: 1fr; }
  .karbon-results { grid-template-columns: repeat(2, 1fr); }
  .price-main { font-size: 40px; }
  .seat-input-row { flex-direction: column; align-items: flex-start; }
  .footer .container { flex-direction: column; text-align: center; }
}

/* ── Route Combobox ──────────────────────────────────────── */
.route-combobox-wrap {
  position: relative;
  flex: 1 1 220px;
  min-width: 0;
}
.combo-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.combo-field {
  position: relative;
}
.combo-input {
  width: 100%;
  padding-right: 36px;
  box-sizing: border-box;
}
.combo-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
  color: var(--muted);
  min-width: 32px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  list-style: none;
  padding: 4px;
  margin: 0;
}
.combo-list[hidden] { display: none; }
.combo-item {
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
  line-height: 1.3;
}
.combo-item:hover,
.combo-item[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.combo-item mark {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}
.combo-error {
  color: var(--danger, #ef4444);
  font-size: 13px;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .route-combobox-wrap { flex: 1 1 100%; }
}
