/* =====================================================================================================
 *  kingstur-secim.css  —  Dil modalı · Para birimi modalı · Sorgu sekmeleri
 * -----------------------------------------------------------------------------------------------------
 *  Bağımsız çalışır. kingstur-premium.css varsa onun değişkenlerini devralır, yoksa kendi
 *  yedek değerlerini kullanır — bu yüzden tek başına yüklenebilir.
 *
 *  SIRALAMA: Bu dosya diğer tüm css'lerden SONRA yüklenmeli.
 * ===================================================================================================== */

:root {
  --kt-brand:        var(--kp-brand, #e01b22);
  --kt-brand-soft:   rgba(224, 27, 34, .08);
  --kt-brand-ring:   rgba(224, 27, 34, .18);
  --kt-ink:          var(--kp-text,   #12131a);
  --kt-ink-2:        var(--kp-text-2, #63656f);
  --kt-ink-3:        #9a9ca6;
  --kt-surface:      var(--kp-surface,   #ffffff);
  --kt-surface-2:    var(--kp-surface-2, #f7f7f9);
  --kt-line:         var(--kp-line,      #e8e8ed);
  --kt-r-sm: 10px;
  --kt-r-md: 14px;
  --kt-r-lg: 18px;
  --kt-r-xl: 24px;
  --kt-pill: 999px;
  --kt-fast: .18s cubic-bezier(.22, .61, .36, 1);
  --kt-slow: .34s cubic-bezier(.22, .61, .36, 1);
  --kt-sh-1: 0 1px 2px rgba(16, 20, 40, .05), 0 4px 14px rgba(16, 20, 40, .06);
  --kt-sh-2: 0 8px 26px rgba(16, 20, 40, .10), 0 2px 6px rgba(16, 20, 40, .05);
  --kt-sh-3: 0 24px 70px rgba(10, 14, 30, .22), 0 4px 14px rgba(10, 14, 30, .10);
}

/* =====================================================================================================
   1) SORGU SEKMELERİ  (Uçak / Otobüs / Otel / Tur / Araç / PNR)
   -----------------------------------------------------------------------------------------------------
   Kahraman görselin üstünde durduğu için cam (frosted) bir segmented control.
   Aktif sekmeyi JS bir "pill" ile kaydırır; JS çalışmazsa CSS yedeği devreye girer.
   ===================================================================================================== */

body .custom-search-form__label {
  position: relative;
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: 2px !important;
  width: max-content;
  max-width: 100%;
  margin: 26px auto 14px !important;
  padding: 5px !important;
  border-radius: var(--kt-pill);
  /* Kahraman görsel açık da olabilir koyu da — koyu cam her ikisinde de okunur kalır */
  background: rgba(11, 16, 38, .34);
  border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 12px 34px rgba(8, 12, 30, .22), inset 0 1px 0 rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
body .custom-search-form__label::-webkit-scrollbar { display: none; }

/* Kenar solması: SADECE o yönde devamı varsa. Sınıfları JS ekler,
   böylece aktif sekme kenardayken yarı saydam görünmez. */
body .custom-search-form__label.kt-uc-sag {
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
          mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 30px), transparent 100%);
}
body .custom-search-form__label.kt-uc-sol {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 100%);
}
body .custom-search-form__label.kt-uc-sol.kt-uc-sag {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
          mask-image: linear-gradient(to right, transparent 0, #000 30px, #000 calc(100% - 30px), transparent 100%);
}

/* kayan aktif göstergesi */
body .custom-search-form__label .kt-tabs__pill {
  position: absolute;
  top: 5px;
  left: 0;
  height: calc(100% - 10px);
  border-radius: var(--kt-pill);
  background: #fff;
  box-shadow: 0 8px 22px rgba(8, 12, 30, .26), 0 1px 3px rgba(8, 12, 30, .14);
  transform: translate3d(0, 0, 0);
  transition: transform var(--kt-slow), width var(--kt-slow), opacity var(--kt-fast);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
body .custom-search-form__label.kt-tabs--ready .kt-tabs__pill { opacity: 1; }

/* ilk boyamada kaymasın */
body .custom-search-form__label.kt-tabs--silent .kt-tabs__pill { transition: none; }

body .custom-search-form__label__item {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  scroll-snap-align: center;
  height: auto !important;
  min-height: 42px;
  padding: 10px 20px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: var(--kt-pill) !important;
  background: transparent !important;
  color: rgba(255, 255, 255, .95) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: color var(--kt-fast), background var(--kt-fast);
  -webkit-tap-highlight-color: transparent;
}
body .custom-search-form__label__item > span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  pointer-events: none;
}
body .custom-search-form__label__item i {
  font-size: 16px;
  width: auto !important;
  opacity: .9;
  transition: color var(--kt-fast), opacity var(--kt-fast);
}

/* fare üzerindeyken — aktif olan hariç */
body .custom-search-form__label__item:not(.active):hover {
  background: rgba(255, 255, 255, .16) !important;
  color: #fff !important;
}
body .custom-search-form__label__item:not(.active):active { transform: scale(.97); }

body .custom-search-form__label__item.active {
  color: #12131a !important;
  font-weight: 600 !important;
  background: transparent !important;   /* pill hallediyor */
}
body .custom-search-form__label__item.active i { color: var(--kt-brand); opacity: 1; }

/* JS yoksa / pill hazır değilse: klasik beyaz zemin yedeği */
body .custom-search-form__label:not(.kt-tabs--ready) .custom-search-form__label__item.active {
  background: #fff !important;
  box-shadow: 0 6px 18px rgba(8, 12, 30, .18);
}

body .custom-search-form__label__item:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Açık zeminli sayfalarda (custom-header--light) sekmeler koyu metin ister */
body .custom-header--light .custom-search-form__label {
  background: var(--kt-surface-2);
  border-color: var(--kt-line);
  box-shadow: none;
  -webkit-backdrop-filter: none;
          backdrop-filter: none;
}
body .custom-header--light .custom-search-form__label__item { color: var(--kt-ink-2) !important; }
body .custom-header--light .custom-search-form__label__item:not(.active):hover {
  background: rgba(18, 19, 26, .05) !important;
  color: var(--kt-ink) !important;
}

@media (max-width: 767.98px) {
  body .custom-search-form__label {
    width: auto;
    margin: 18px 0 12px !important;
    padding: 4px !important;
    border-radius: var(--kt-r-lg);
    justify-content: flex-start !important;
  }
  body .custom-search-form__label .kt-tabs__pill {
    top: 4px;
    height: calc(100% - 8px);
    border-radius: var(--kt-r-md);
  }
  body .custom-search-form__label__item {
    padding: 9px 14px !important;
    font-size: 14px !important;
    border-radius: var(--kt-r-md) !important;
  }
  body .custom-search-form__label__item > span { gap: 7px; }
  body .custom-search-form__label__item i { font-size: 15px; }
}

/* Çok dar ekranda (≤380px) yazılar sığsın diye biraz daha sıkı */
@media (max-width: 380px) {
  body .custom-search-form__label__item { padding: 9px 11px !important; font-size: 13px !important; }
}

/* =====================================================================================================
   2) SEÇİM MODALLARI  (dil + para birimi ortak iskelet)
   ===================================================================================================== */

.kt-modal .modal-dialog {
  max-width: 720px;
  margin: 1.75rem auto;
}
.kt-modal--wide .modal-dialog { max-width: 860px; }

.kt-modal .modal-content,
.kt-modal .kt-modal__content {
  border: 0;
  border-radius: var(--kt-r-xl);
  background: var(--kt-surface);
  box-shadow: var(--kt-sh-3);
  overflow: hidden;
}

/* --- Sürükleme tutamağı (yalnız mobil) --- */
.kt-modal__grip { display: none; }

/* --- Başlık --- */
.kt-modal__head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 14px;
}
.kt-modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--kt-ink);
  line-height: 1.25;
}
.kt-modal__sub {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--kt-ink-2);
  line-height: 1.35;
}
.kt-modal__close {
  margin-inline-start: auto;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--kt-pill);
  background: var(--kt-surface-2);
  color: var(--kt-ink-2);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--kt-fast), color var(--kt-fast), transform var(--kt-fast);
}
.kt-modal__close:hover { background: #ececf1; color: var(--kt-ink); }
.kt-modal__close:active { transform: scale(.93); }

/* --- Arama --- */
.kt-modal__search {
  position: relative;
  margin: 0 24px 16px;
}
.kt-modal__search svg {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--kt-ink-3);
  pointer-events: none;
}
.kt-modal__input {
  width: 100%;
  height: 46px;
  padding-inline: 42px 42px;
  border: 1px solid var(--kt-line);
  border-radius: var(--kt-r-md);
  background: var(--kt-surface-2) !important;
  color: var(--kt-ink);
  font-size: 15px;
  outline: none;
  transition: border-color var(--kt-fast), background var(--kt-fast), box-shadow var(--kt-fast);
}
.kt-modal__input::placeholder { color: var(--kt-ink-3) !important; font-weight: 400; }
.kt-modal__input:focus {
  background: var(--kt-surface) !important;
  border-color: var(--kt-brand);
  box-shadow: 0 0 0 3px var(--kt-brand-ring);
}
.kt-modal__clear {
  position: absolute;
  inset-inline-end: 9px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--kt-pill);
  background: #e4e4ea;
  color: #5c5e68;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.kt-modal__clear:hover { background: #d8d8e0; }
.kt-modal__search.is-filled .kt-modal__clear { display: inline-flex; }

/* --- Gövde --- */
.kt-modal__body {
  padding: 0 24px 24px;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.kt-modal__body::-webkit-scrollbar { width: 8px; }
.kt-modal__body::-webkit-scrollbar-thumb { background: #d7d7de; border-radius: 8px; }
.kt-modal__body::-webkit-scrollbar-track { background: transparent; }

.kt-group + .kt-group { margin-top: 22px; }
.kt-group__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--kt-ink-3);
}
.kt-group__title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--kt-line);
}

.kt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(212px, 1fr));
  gap: 8px;
}

/* --- Tek seçenek --- */
.kt-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--kt-line);
  border-radius: var(--kt-r-md);
  background: var(--kt-surface);
  color: var(--kt-ink);
  text-align: start;
  cursor: pointer;
  opacity: 1 !important;               /* Bootstrap [disabled] soldurmasın */
  transition: border-color var(--kt-fast), background var(--kt-fast),
              box-shadow var(--kt-fast), transform var(--kt-fast);
}
.kt-opt:hover {
  border-color: #d5d5de;
  background: var(--kt-surface-2);
  box-shadow: var(--kt-sh-1);
}
.kt-opt:active { transform: scale(.985); }
.kt-opt:focus-visible {
  outline: none;
  border-color: var(--kt-brand);
  box-shadow: 0 0 0 3px var(--kt-brand-ring);
}

.kt-opt.is-active {
  border-color: var(--kt-brand);
  background: var(--kt-brand-soft);
  box-shadow: 0 0 0 1px var(--kt-brand) inset;
}
.kt-opt.is-active .kt-opt__name { font-weight: 650; }

/* bayrak */
.kt-opt__flag {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--kt-pill);
  overflow: hidden;
  background: var(--kt-surface-2);
  box-shadow: inset 0 0 0 1px rgba(18, 19, 26, .08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kt-opt__flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* para birimi sembolü */
.kt-opt__sym {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: var(--kt-r-sm);
  background: var(--kt-surface-2);
  box-shadow: inset 0 0 0 1px rgba(18, 19, 26, .08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--kt-ink);
  line-height: 1;
  /* "د.إ" gibi uzun sembollerde taşmasın */
  overflow: hidden;
  padding: 0 3px;
}
.kt-opt.is-active .kt-opt__sym {
  background: #fff;
  color: var(--kt-brand);
  box-shadow: inset 0 0 0 1px var(--kt-brand-ring);
}

.kt-opt__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.kt-opt__name {
  font-size: 14.5px;
  font-weight: 550;
  line-height: 1.3;
  color: var(--kt-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kt-opt__meta {
  font-size: 12.5px;
  color: var(--kt-ink-2);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kt-opt__check {
  margin-inline-start: auto;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: var(--kt-pill);
  background: var(--kt-brand);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
}
.kt-opt.is-active .kt-opt__check { display: inline-flex; }

/* --- Arama sonucu yok --- */
.kt-empty {
  display: none;
  padding: 44px 20px;
  text-align: center;
  color: var(--kt-ink-2);
}
.kt-empty strong { display: block; color: var(--kt-ink); font-size: 15px; margin-bottom: 4px; }
.kt-empty span { font-size: 13.5px; }
.kt-modal__body.is-empty .kt-empty { display: block; }

.kt-group.is-hidden,
.kt-opt.is-hidden { display: none !important; }

/* =====================================================================================================
   3) MOBİL — modallar alttan açılan sayfa (bottom sheet) olur
   ===================================================================================================== */

@media (max-width: 575.98px) {
  .kt-modal .modal-dialog {
    position: fixed;
    inset: auto 0 0 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
    align-items: flex-end;
    min-height: 0;
  }
  .kt-modal.fade .modal-dialog {
    transform: translate3d(0, 100%, 0);
    transition: transform var(--kt-slow);
  }
  .kt-modal.show .modal-dialog { transform: translate3d(0, 0, 0); }

  .kt-modal .modal-content {
    border-radius: 22px 22px 0 0;
    max-height: 92vh;
    max-height: 92dvh;
  }

  .kt-modal__grip {
    display: block;
    width: 42px;
    height: 4px;
    margin: 9px auto 0;
    border-radius: var(--kt-pill);
    background: #d9d9e1;
  }

  .kt-modal__head   { padding: 12px 18px 12px; }
  .kt-modal__title  { font-size: 18px; }
  .kt-modal__search { margin: 0 18px 14px; }
  .kt-modal__body {
    padding: 0 18px calc(20px + env(safe-area-inset-bottom, 0px));
    max-height: 58vh;
    max-height: 58dvh;
  }

  .kt-grid { grid-template-columns: 1fr; gap: 7px; }
  .kt-opt  { min-height: 58px; }
}

/* =====================================================================================================
   4) RTL
   ===================================================================================================== */

html[dir="rtl"] .kt-opt,
body[dir="rtl"] .kt-opt { text-align: right; }

html[dir="rtl"] .kt-modal__search svg,
body[dir="rtl"] .kt-modal__search svg { transform: translateY(-50%) scaleX(-1); }

/* =====================================================================================================
   5) ÜST BAR — dil / para birimi tetikleyicileri
   ===================================================================================================== */

#langDropdown-1, #langDropdown-2,
#currDropdown-1, #currDropdown-2 {
  border: 1px solid var(--kt-line) !important;
  border-radius: var(--kt-pill) !important;
  background: var(--kt-surface) !important;
  padding: 7px 14px !important;
  font-weight: 500;
  color: var(--kt-ink) !important;
  transition: background var(--kt-fast), border-color var(--kt-fast), box-shadow var(--kt-fast);
}
#langDropdown-1:hover, #langDropdown-2:hover,
#currDropdown-1:hover, #currDropdown-2:hover {
  background: var(--kt-surface-2) !important;
  border-color: #d9d9e1 !important;
  box-shadow: var(--kt-sh-1);
}
#langDropdown-1 .flag-icon, #langDropdown-2 .flag-icon,
#langDropdown-1 img, #langDropdown-2 img {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px;
  border-radius: var(--kt-pill);
  object-fit: cover;
  flex: 0 0 auto;
}
#langDropdown-1 .flag-text, #langDropdown-2 .flag-text,
#currDropdown-1 .flag-text, #currDropdown-2 .flag-text {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}

/* =====================================================================================================
   6) Hareket azaltma tercihi
   ===================================================================================================== */

@media (prefers-reduced-motion: reduce) {
  body .custom-search-form__label .kt-tabs__pill,
  .kt-modal .modal-dialog,
  .kt-opt { transition: none !important; }
}
