/* ==========================================================================
   MSK Select2 — Sıfır jQuery, Türkçe Arama Destekli Modern Select Bileşeni
   ========================================================================== */

.msk-s2 {
  position: relative;
  width: 100%;
  min-width: 0;
  font-family: var(--font-sans, "Manrope", "Segoe UI", sans-serif);
}

.msk-s2-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.msk-s2__trigger {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1.5px solid #cbdcf0;
  border-radius: 10px;
  color: #0b1b32;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.msk-s2__trigger:hover {
  border-color: #00a8e8;
}

.msk-s2.is-open .msk-s2__trigger,
.msk-s2__trigger:focus-visible {
  border-color: #00a8e8;
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.18);
  outline: none;
}

.msk-s2__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.msk-s2__value.is-placeholder {
  color: #5b7290;
  font-weight: 500;
}

.msk-s2__arrow {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  color: #0f4c9e;
  font-size: 12px;
  flex-shrink: 0;
  transition: transform 200ms ease, color 180ms ease;
}

.msk-s2.is-open .msk-s2__arrow {
  transform: rotate(180deg);
  color: #ff6b1a;
}

.msk-s2__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 2600;
  background: #ffffff;
  border: 1.5px solid #00a8e8;
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(4, 13, 27, 0.22);
  overflow: hidden;
  display: none;
}

.msk-s2.is-open .msk-s2__dropdown {
  display: block;
  animation: msk-s2-pop 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.msk-s2.is-dropup .msk-s2__dropdown {
  top: auto;
  bottom: calc(100% + 6px);
}

.msk-s2__search-wrap {
  position: relative;
  padding: 10px;
  background: #f4f9ff;
  border-bottom: 1px solid #dce8f5;
}

.msk-s2__search-wrap > i {
  position: absolute;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: #00a8e8;
  font-size: 13px;
  pointer-events: none;
}

.msk-s2__search {
  width: 100% !important;
  min-height: 38px !important;
  padding: 8px 12px 8px 34px !important;
  border: 1.5px solid #cbdcf0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0b1b32 !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  outline: none !important;
}

.msk-s2__search:focus {
  border-color: #00a8e8 !important;
  box-shadow: 0 0 0 3px rgba(0, 168, 232, 0.14) !important;
}

.msk-s2__list {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.msk-s2__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: #0b1b32;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.msk-s2__option:hover,
.msk-s2__option.is-highlighted {
  background: #eaf6ff;
  color: #0f4c9e;
}

.msk-s2__option.is-selected {
  background: linear-gradient(135deg, #0f4c9e 0%, #00a8e8 100%);
  color: #ffffff;
  font-weight: 700;
}

.msk-s2__option.is-selected::after {
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
}

.msk-s2__empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 13px;
  color: #5b7290;
}

/* Özel Bağlam Uyumları (Ana sayfa il seçici & kategori barı) */
.home-city-select .msk-s2 {
  flex: 1;
}

.home-city-select .msk-s2__trigger {
  border: 0;
  background: transparent;
  min-height: 44px;
  padding: 8px 6px;
  box-shadow: none !important;
}

.public-category {
  min-width: 240px;
}

.public-category .msk-s2__trigger {
  min-height: 60px;
  border-radius: 12px;
}

@keyframes msk-s2-pop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 768px) {
  .public-category {
    min-width: 0;
    width: 100%;
  }
  .public-category .msk-s2__trigger {
    min-height: 54px;
  }
}
