/* ==========================================================================
   TourTurka Arama Modalı
   Tüm seçiciler .tts altında; sitenin Bootstrap stilleriyle çakışmaz.
   Renkleri sitenize göre değiştirmek için sadece :root değişkenlerini düzenleyin.
   ========================================================================== */

.tts {
  --tts-ink: #1c2230;
  --tts-muted: #667085;
  --tts-line: #e6e8ec;
  --tts-surface: #ffffff;
  --tts-soft: #f3f5f8;
  --tts-accent: #a1122b;        /* sitedeki "Hızlı Arama" başlığının bordosu */
  --tts-accent-soft: #fbecee;
  --tts-backdrop: rgba(16, 22, 34, .55);
  --tts-radius: 16px;
  --tts-font: inherit;           /* sitenin fontu (Poppins) */

  position: fixed;
  inset: 0;
  z-index: 2147483000;
  font-family: var(--tts-font);
  color: var(--tts-ink);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
.tts[hidden] { display: none !important; }
.tts *, .tts *::before, .tts *::after { box-sizing: border-box; }
.tts button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
.tts a { color: inherit; text-decoration: none; }
.tts img { display: block; max-width: none; }

html.tts-lock, html.tts-lock body { overflow: hidden !important; }

/* ---------- Çerçeve ---------- */

.tts-backdrop {
  position: absolute;
  inset: 0;
  background: var(--tts-backdrop);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  animation: tts-fade .16s ease-out;
}

.tts-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, calc(100% - 32px));
  max-height: min(84vh, 760px);
  margin: 8vh auto 0;
  background: var(--tts-surface);
  border-radius: var(--tts-radius);
  box-shadow: 0 24px 64px -12px rgba(16, 22, 34, .35), 0 0 0 1px rgba(16, 22, 34, .06);
  overflow: hidden;
  animation: tts-rise .18s cubic-bezier(.2, .8, .2, 1);
}

@keyframes tts-fade { from { opacity: 0; } }
@keyframes tts-rise { from { opacity: 0; transform: translateY(-8px) scale(.99); } }

/* ---------- Arama satırı ---------- */

.tts-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 0 14px 0 20px;
  border-bottom: 1px solid var(--tts-line);
  margin: 0;
}
.tts-bar-icon { flex: none; width: 20px; height: 20px; color: var(--tts-muted); }

.tts-input {
  flex: 1;
  min-width: 0;
  height: 62px;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  font: inherit;
  font-size: 18px;
  color: var(--tts-ink);
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}
.tts-input::placeholder { color: #98a2b3; opacity: 1; }
.tts-input::-webkit-search-cancel-button,
.tts-input::-webkit-search-decoration { -webkit-appearance: none; }

.tts-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--tts-muted);
}
.tts-clear:hover { background: var(--tts-soft); color: var(--tts-ink); }
.tts-clear svg { width: 16px; height: 16px; }

.tts-close {
  flex: none;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--tts-line) !important;
  border-radius: 8px;
  font-size: 12px;
  color: var(--tts-muted);
}
.tts-close:hover { color: var(--tts-ink); border-color: #cdd2d9 !important; }
.tts-close .tts-close-text { display: none; }

/* yüklenirken alt çizgide akan ince şerit */
.tts-progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
  opacity: 0;
  transition: opacity .15s;
}
.tts.is-loading .tts-progress { opacity: 1; }
.tts-progress::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 30%;
  background: var(--tts-accent);
  animation: tts-slide 1s ease-in-out infinite;
}
@keyframes tts-slide { from { left: -30%; } to { left: 100%; } }

/* ---------- Sekmeler ---------- */

.tts-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  border-bottom: 1px solid var(--tts-line);
  overflow-x: auto;
  scrollbar-width: none;
}
.tts-tabs::-webkit-scrollbar { display: none; }
.tts-tabs[hidden] { display: none; }

.tts-tab {
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 10px;
  font-size: 14px;
  color: var(--tts-muted);
  white-space: nowrap;
}
.tts-tab:hover { color: var(--tts-ink); }
.tts-tab[aria-selected="true"] { color: var(--tts-ink); font-weight: 600; }
.tts-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset-inline: 10px;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--tts-accent);
}
.tts-tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 10px;
  background: var(--tts-soft);
  font-size: 12px;
  font-weight: 500;
  color: var(--tts-muted);
  text-align: center;
}
.tts-tab[aria-selected="true"] .tts-tab-count { background: var(--tts-accent-soft); color: var(--tts-accent); }

/* ---------- Gövde ---------- */

.tts-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 8px 14px;
}

.tts-section + .tts-section { margin-top: 6px; }

.tts-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 12px 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--tts-muted);
}
.tts-h-count { font-weight: 400; margin-inline-start: 4px; }
.tts-h-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--tts-accent) !important;
  white-space: nowrap;
}
.tts-h-action:hover { text-decoration: underline !important; }

/* ---------- Sonuç satırı ---------- */

.tts-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  scroll-margin: 8px;
}
.tts-item:hover,
.tts-item.is-active { background: var(--tts-soft); }
.tts-item:focus-visible,
.tts-item.is-active { outline: 2px solid var(--tts-accent); outline-offset: -2px; }
.tts-item:hover { outline: 0; }

.tts-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--tts-soft);
}
.tts-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* etkinliklerde görsel yerine takvim yaprağı */
.tts-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 10px;
  border: 1px solid var(--tts-line);
  background: var(--tts-surface);
  line-height: 1;
}
.tts-date-m { font-size: 11px; font-weight: 600; color: var(--tts-accent); margin-bottom: 4px; }
.tts-date-d { font-size: 21px; font-weight: 600; color: var(--tts-ink); }

.tts-text { min-width: 0; }
.tts-title,
.tts-sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tts-title { font-size: 15px; font-weight: 500; color: var(--tts-ink); }
.tts-sub { margin-top: 2px; font-size: 13px; color: var(--tts-muted); }
.tts-title mark {
  padding: 0;
  border-radius: 2px;
  background: var(--tts-accent-soft);
  color: var(--tts-accent);
  font-weight: 600;
}

.tts-meta {
  text-align: end;
  font-size: 13px;
  color: var(--tts-muted);
  white-space: nowrap;
}
.tts-meta strong { display: block; font-size: 14px; font-weight: 600; color: var(--tts-ink); }

/* ---------- Bölge kartı ---------- */

.tts-hub {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  margin: 10px 4px 4px;
  border: 1px solid var(--tts-line);
  border-radius: 14px;
  overflow: hidden;
}
.tts-hub-img { position: relative; background: var(--tts-soft); min-height: 132px; }
.tts-hub-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tts-hub-body { padding: 16px 18px; min-width: 0; }
.tts-hub-kind { font-size: 13px; color: var(--tts-muted); }
.tts-hub-title {
  display: inline-block;
  margin: 2px 0 2px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--tts-ink);
}
.tts-hub-title:hover { color: var(--tts-accent); }
.tts-hub-sub { font-size: 13px; color: var(--tts-muted); }
.tts-hub-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- Çipler ---------- */

.tts-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 12px 4px; }
.tts-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--tts-line) !important;
  border-radius: 999px;
  background: var(--tts-surface);
  font-size: 14px;
  color: var(--tts-ink);
  white-space: nowrap;
}
.tts-chip:hover,
.tts-chip:focus-visible { border-color: var(--tts-accent) !important; color: var(--tts-accent); outline: 0; }
.tts-chip b { font-weight: 600; }
.tts-chip-x {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-inline-end: -6px;
  border-radius: 50%;
  color: var(--tts-muted);
}
.tts-chip-x:hover { background: var(--tts-soft); color: var(--tts-ink); }
.tts-chip-x svg { width: 10px; height: 10px; }

.tts-filter { padding: 10px 12px 0; }
.tts-filter .tts-chip { background: var(--tts-accent-soft); border-color: transparent !important; color: var(--tts-accent); }

/* ---------- Keşfedilecek yerler ---------- */

.tts-places {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 12px 4px;
}
.tts-place { display: block; border-radius: 12px; }
.tts-place:focus-visible { outline: 2px solid var(--tts-accent); outline-offset: 2px; }
.tts-place-img {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--tts-soft);
}
.tts-place-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.tts-place:hover .tts-place-img img { transform: scale(1.04); }
.tts-place-title { display: block; margin-top: 8px; font-size: 14px; font-weight: 500; }
.tts-place-sub { display: block; font-size: 12px; color: var(--tts-muted); }

/* ---------- Bilgi / boş / hata ---------- */

.tts-note {
  margin: 10px 12px 2px;
  font-size: 13px;
  color: var(--tts-muted);
}
.tts-empty { padding: 28px 12px 8px; }
.tts-empty-title { margin: 0 0 4px; font-size: 16px; font-weight: 600; color: var(--tts-ink); word-break: break-word; }
.tts-empty-text { margin: 0 0 14px; font-size: 14px; color: var(--tts-muted); }
.tts-empty .tts-chips { padding: 0; }

.tts-more {
  display: block;
  width: calc(100% - 24px);
  height: 42px;
  margin: 10px 12px 0;
  border: 1px solid var(--tts-line) !important;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
}
.tts-more:hover { border-color: var(--tts-accent) !important; color: var(--tts-accent); }

/* ---------- Alt bilgi ---------- */

.tts-foot {
  display: flex;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--tts-line);
  font-size: 12px;
  color: var(--tts-muted);
}
.tts-foot kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  margin-inline-end: 4px;
  border: 1px solid var(--tts-line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--tts-surface);
  font: inherit;
  font-size: 11px;
  text-align: center;
  color: var(--tts-ink);
}

/* ---------- Mobil ---------- */

@media (max-width: 640px) {
  .tts-panel {
    width: 100%;
    max-height: none;
    height: 100%;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
    animation-name: tts-fade;
  }
  .tts-bar { min-height: 58px; padding: 0 8px 0 16px; }
  .tts-input { height: 56px; font-size: 16px; } /* 16px: iOS yakınlaştırmasın */
  .tts-close { border: 0 !important; font-size: 14px; color: var(--tts-accent); padding: 0 8px; }
  .tts-close .tts-close-key { display: none; }
  .tts-close .tts-close-text { display: inline; }
  .tts-foot { display: none; }
  .tts-hub { grid-template-columns: 1fr; }
  .tts-hub-img { min-height: 0; aspect-ratio: 16 / 7; }
  .tts-places { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tts-item { gap: 12px; padding: 8px 8px; }
  .tts-meta { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .tts-backdrop, .tts-panel { animation: none; }
  .tts-progress::before { animation-duration: 3s; }
  .tts-place-img img { transition: none; }
}
