/* bindegit — Konya renkleri: Kubbe-i Hadra turkuazı, Selçuklu laciverdi, çini kobaltı */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("vendor/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("vendor/fonts/space-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("vendor/fonts/space-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --turkuaz: #0B7F7A;       /* Kubbe-i Hadra turkuazı — ana renk */
  --turkuaz-koyu: #0A5E5A;
  --turkuaz-acik: #E0F1EF;  /* vurgu zemini */
  --lacivert: #10263F;      /* Selçuklu laciverdi — yazı, koyu zemin */
  --kobalt: #173F7A;        /* çini kobaltı — otobüs, varış */
  --sis: #F2F6F5;           /* sayfa zemini */
  --yuzey: #FFFFFF;
  --tas: #52647A;           /* ikincil yazı */
  --cizgi: #D9E3E1;
  --cizgi-koyu: #C9D6D4;
  --tramvay: #B3261E;
  --dolmus: #A8500A;
  --dolmus-zemin: #FBEBDD;
  --dolmus-yazi: #8A4208;
  --golge: 0 8px 28px rgba(16, 38, 63, 0.16);
  --baslik: "Space Grotesk", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font: 15px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--lacivert);
  background: var(--sis);
}
button { font-family: inherit; }
#map { position: fixed; inset: 0; z-index: 0; background: #E4ECEA; }

#panel {
  position: fixed; z-index: 1000;
  top: 12px; left: 12px; bottom: 12px;
  width: 400px; max-width: calc(100vw - 24px);
  background: var(--sis);
  border-radius: 20px;
  box-shadow: var(--golge);
  display: flex; flex-direction: column;
  overflow: hidden;
}
#top { background: var(--yuzey); border-bottom: 1px solid var(--cizgi); }
#panel header { display: flex; align-items: center; gap: 8px; padding: 14px 16px 4px; }
.mark {
  width: 32px; height: 32px; border-radius: 9px; background: var(--turkuaz);
  display: flex; align-items: center; justify-content: center; flex: none;
}
#panel h1 {
  margin: 0; font-family: var(--baslik); font-size: 22px; font-weight: 700;
  letter-spacing: -0.5px; color: var(--lacivert);
}
.city {
  margin-left: auto; font-size: 12px; font-weight: 600; color: var(--turkuaz);
  background: var(--turkuaz-acik); padding: 4px 10px; border-radius: 999px;
}

form { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.fields { display: flex; flex-direction: column; gap: 6px; }
.field {
  position: relative; display: flex; align-items: center; gap: 10px;
  background: var(--sis); border-radius: 12px; padding: 0 2px 0 14px; height: 48px;
  border: 1.5px solid transparent;
}
.field:focus-within { border-color: var(--turkuaz); }
.dot { width: 10px; height: 10px; flex: none; }
.dot.from { background: var(--turkuaz); border-radius: 50%; }
.dot.to { background: var(--kobalt); border-radius: 2px; transform: rotate(45deg); }
.field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  color: inherit; font: 500 16px "Inter", system-ui, sans-serif; height: 100%;
}
.field input::placeholder { color: var(--tas); font-weight: 400; }
.field button {
  width: 44px; height: 44px; border: 0; background: transparent; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--tas);
}
.field button:hover { background: var(--cizgi); }
#locate { color: var(--turkuaz); }

.suggest {
  position: absolute; z-index: 10; top: calc(100% + 6px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none;
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 12px;
  box-shadow: var(--golge); max-height: 280px; overflow: auto;
}
.suggest:empty { display: none; }
.suggest li { padding: 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: baseline; }
.suggest li:hover, .suggest li.active { background: var(--turkuaz-acik); }
.suggest .kind { font-size: 11px; font-weight: 600; color: var(--turkuaz-koyu); flex: none; width: 40px; }
.suggest .sub { color: var(--tas); font-size: 12px; }

.when { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.when label { cursor: pointer; }
.when input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.when label span {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--cizgi-koyu); background: var(--yuzey); color: var(--lacivert);
  font-size: 13px; font-weight: 600;
}
.when input[type="radio"]:checked + span { background: var(--lacivert); border-color: var(--lacivert); color: #fff; }
.when input[type="radio"]:focus-visible + span { outline: 2px solid var(--turkuaz); outline-offset: 2px; }
.when input[type="datetime-local"] {
  font: 500 13px "Inter", system-ui, sans-serif; color: var(--lacivert); background: var(--yuzey);
  border: 1px solid var(--cizgi-koyu); border-radius: 10px; padding: 0 8px; height: 36px;
}

#sheet { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#handle { display: none; }
.status { padding: 14px 16px 4px; color: var(--tas); font-size: 14px; }
.status:empty { display: none; }
.status.error { color: #9A3412; }

/* başlangıç ekranı: hızlı varış ve taşıt türleri */
#home { padding: 12px 14px 4px; display: flex; flex-direction: column; gap: 14px; }
#home[hidden] { display: none; }
#home h2 { margin: 0 0 8px; font-family: var(--baslik); font-size: 17px; font-weight: 600; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.quick button {
  height: 48px; border: 0; border-radius: 12px; background: var(--turkuaz-acik); color: var(--turkuaz-koyu);
  font-size: 14px; font-weight: 600; text-align: left; padding: 0 14px; cursor: pointer;
}
.quick button:hover { background: #CFE9E6; }
.modes { display: flex; gap: 8px; }
.modes div {
  flex: 1; background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 12px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px;
}
.modes i { width: 22px; height: 6px; border-radius: 3px; }
.modes b { font-size: 13px; }
.modes span { font-size: 12px; color: var(--tas); }

#results { list-style: none; margin: 0; padding: 10px 12px 12px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 10px; }
#results:empty { display: none; }
.trip {
  background: var(--yuzey); border: 1px solid var(--cizgi); border-radius: 16px; padding: 14px;
  cursor: pointer; display: flex; flex-direction: column; gap: 8px; flex: none;
}
.trip:hover { border-color: var(--cizgi-koyu); }
.trip.selected { border: 2px solid var(--turkuaz); padding: 13px; }
.trip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.trip-times { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.trip-dur { font-family: var(--baslik); font-size: 20px; font-weight: 700; white-space: nowrap; }
.trip.selected .trip-dur { color: var(--turkuaz); }
.trip-meta { color: var(--tas); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 7px;
  font-size: 13px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip small { font-size: 10px; font-weight: 600; opacity: 0.9; letter-spacing: 0.2px; }
.chip.walk { background: transparent; color: var(--tas); font-weight: 600; padding: 4px 0; }
.sep { color: #8696A8; font-size: 12px; }
.grp { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.badge-est {
  align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--dolmus-yazi);
  background: var(--dolmus-zemin); padding: 4px 9px; border-radius: 6px;
}
.trip-hint { color: var(--turkuaz); font-size: 13px; font-weight: 600; }
.trip.open .trip-hint, .trip:not(.selected) .trip-hint { display: none; }

/* adım adım tarif: zaman çizgisi */
.steps { margin: 6px 0 0; padding: 12px 0 0; list-style: none; display: none; border-top: 1px solid var(--cizgi); }
.trip.open .steps { display: block; }
.step { display: grid; grid-template-columns: 42px 18px minmax(0, 1fr); column-gap: 10px; }
.step .t { color: var(--tas); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; padding-top: 1px; }
.rail { display: flex; flex-direction: column; align-items: center; }
.node {
  width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--tas);
  box-sizing: content-box; flex: none; margin-top: 2px;
}
.node.start { background: var(--turkuaz); border-color: #fff; box-shadow: 0 0 0 1.5px var(--turkuaz); }
.node.end { background: var(--kobalt); border-color: #fff; box-shadow: 0 0 0 1.5px var(--kobalt); border-radius: 2px; transform: rotate(45deg); margin-top: 3px; }
.line { flex: 1; width: 6px; border-radius: 3px; margin: 3px 0; min-height: 14px; }
.line.walk { width: 0; border-left: 3px dotted #8696A8; border-radius: 0; margin: 4px 0; }
.body { padding-bottom: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.step:last-child .body { padding-bottom: 2px; }
.step .title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.step .desc { color: var(--tas); font-size: 13px; }
.xfer { background: var(--turkuaz-acik); border-radius: 12px; padding: 10px 12px; }
.xfer b { display: block; font-size: 13px; color: var(--turkuaz-koyu); }
.xfer span { font-size: 13px; color: #25465B; }
.step details { font-size: 13px; color: var(--tas); }
.step summary {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; cursor: pointer; list-style: none;
  border: 1px solid var(--cizgi-koyu); background: var(--yuzey); border-radius: 10px;
  font-weight: 600; color: var(--lacivert);
}
.step summary::-webkit-details-marker { display: none; }
.step details ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.step details li { display: flex; gap: 8px; }
.step details li time { font-variant-numeric: tabular-nums; color: var(--tas); flex: none; width: 40px; }
.est { font-size: 12px; font-weight: 600; color: var(--dolmus-yazi); }

footer { padding: 8px 14px; border-top: 1px solid var(--cizgi); color: var(--tas); font-size: 11.5px; background: var(--yuzey); }
footer:empty { display: none; }

/* harita üzerindekiler */
.pick { display: flex; flex-direction: column; gap: 6px; min-width: 170px; font-family: "Inter", system-ui, sans-serif; }
.pick b { font-size: 14px; color: var(--lacivert); }
.pick button {
  font: 600 13px "Inter", system-ui, sans-serif; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 0; background: var(--turkuaz-acik); color: var(--turkuaz-koyu); text-align: left;
}
.pick button[data-k="to"] { background: var(--lacivert); color: #fff; }
.pick .lines { font-size: 12px; color: var(--tas); }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--golge); }
.leaflet-container { font-family: "Inter", system-ui, sans-serif; }
.leaflet-bar a { color: var(--lacivert); }

.pin { width: 20px; height: 20px; border: 4px solid #fff; box-shadow: 0 2px 6px rgba(16, 38, 63, 0.45); }
.pin.from { background: var(--turkuaz); border-radius: 50%; }
.pin.to { background: var(--kobalt); border-radius: 4px; transform: rotate(45deg); }

/* Telefon: arama kutusu üstte, sonuçlar altta açılır-kapanır sayfa */
@media (max-width: 720px) {
  #panel { display: contents; }
  #top {
    position: fixed; z-index: 1001;
    top: calc(10px + env(safe-area-inset-top)); left: 10px; right: 10px;
    border: 0; border-radius: 20px; box-shadow: var(--golge);
  }
  #panel header { padding: 12px 14px 2px; }
  #top.compact header { display: none; }
  #top.compact form { padding-top: 12px; }
  form { padding: 8px 12px 12px; }
  #sheet {
    position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0;
    max-height: 46vh;
    background: var(--sis); border-radius: 24px 24px 0 0; box-shadow: 0 -8px 28px rgba(16, 38, 63, 0.14);
    padding-bottom: env(safe-area-inset-bottom);
    transition: max-height 0.2s ease;
  }
  #sheet.big { max-height: calc(100vh - 170px - env(safe-area-inset-top)); }
  #sheet.small { max-height: calc(150px + env(safe-area-inset-bottom)); }
  #sheet.small #results { overflow: hidden; }
  #handle {
    display: block; flex: none; width: 100%; height: 24px;
    border: 0; background: transparent; cursor: pointer; padding: 0;
  }
  #handle span { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--cizgi-koyu); margin: 0 auto; }
  .status { padding: 2px 16px 8px; }
  #home { padding-top: 2px; overflow: auto; }
  #results { padding-top: 2px; }
  footer { font-size: 10.5px; padding: 6px 12px; background: transparent; }
  .leaflet-control-zoom { display: none; }
  .leaflet-bottom { display: none; }
}
