/**
 * Select2 – Kart Baskı tema (#004AAB)
 * Arama kutusu yok (minimumResultsForSearch: Infinity layout’ta). Tüm select’ler eşit, yazılar tam görünsün.
 */

/* ---- Arama kutusu: kullanıcı sadece listeyi seçebilir, yazı giremez ---- */
.select2-container--default .select2-search--dropdown,
.select2-dropdown .select2-search--dropdown,
.select2-search--dropdown {
  display: none !important;
}

/* ---- Container: tüm select’ler eşit (min yükseklik, padding, font) ---- */
.select2-container--default .select2-selection--single {
  height: auto !important;
  min-height: 34px !important;
  padding: 0.4rem 2rem 0.4rem 0.65rem !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 4px !important;
  background-color: #fff !important;
  outline: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
  border-color: #004AAB !important;
  box-shadow: 0 0 0 3px rgba(0, 74, 171, 0.15) !important;
}

/* Seçilen metin tam görünsün (kesilmesin) */
.select2-container--default .select2-selection--single .select2-selection__rendered {
  padding-left: 0 !important;
  color: #2C2C2C !important;
  line-height: 1.45 !important;
  font-size: 0.875rem !important;
  white-space: normal !important;
  word-break: break-word !important;
  display: block !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 100% !important;
  right: 8px !important;
  top: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
  border-color: #6c757d transparent transparent transparent !important;
  border-width: 5px 4px 0 4px !important;
  margin-left: -4px !important;
  margin-top: -2px !important;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
  border-color: transparent transparent #6c757d transparent !important;
  border-width: 0 4px 5px 4px !important;
}

/* ---- Dropdown: tutarlı görünüm, option metinleri tam ---- */
.select2-dropdown {
  border: 1px solid rgba(0, 74, 171, 0.2) !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 24px rgba(0, 74, 171, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  padding: 4px 0 !important;
  overflow: hidden !important;
}

.select2-dropdown .select2-results__option {
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #2C2C2C !important;
  white-space: normal !important;
  word-break: break-word !important;
  line-height: 1.4 !important;
}

.select2-dropdown .select2-results__option--highlighted[aria-selected] {
  background-color: rgba(0, 74, 171, 0.08) !important;
  color: #004AAB !important;
}

.select2-dropdown .select2-results__option[aria-selected=true] {
  background-color: rgba(0, 74, 171, 0.12) !important;
  color: #004AAB !important;
  font-weight: 500 !important;
}

.select2-dropdown .select2-results__option--highlighted[aria-selected=true] {
  background-color: rgba(0, 74, 171, 0.18) !important;
  color: #004AAB !important;
}

.select2-dropdown .select2-results__message {
  color: #6c757d !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0.75rem !important;
}

.select2-results__options {
  max-height: 260px !important;
  overflow-y: auto !important;
}

/* Tüm Select2 kutuları eşit min genişlik; kolon içinde %100 ile taşma olmasın */
.select2-container--default {
  min-width: 180px !important;
  max-width: 100% !important;
}

/* ========== product-detail: Fiyat Hesapla – select’ler sağa hizalı, eşit genişlik ========== */
.product-config-form .product-config-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.product-config-form .product-config-label {
  flex: 1 1 0;
  min-width: 0;
}
.product-config-form .product-config-select-wrap {
  flex: 0 0 auto;
  width: 280px;
  max-width: 100%;
  margin-left: auto;
}
.product-config-form .product-config-select-wrap .select2-container {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
}
@media (max-width: 575.98px) {
  .product-config-form .product-config-row {
    flex-direction: column;
    align-items: stretch;
  }
  .product-config-form .product-config-label {
    margin-bottom: 0.15rem;
  }
  .product-config-form .product-config-select-wrap {
    width: 100%;
    margin-left: 0;
  }
}

/* Tasarım Hizmeti Al toggle (Hayır/Evet) – eşit genişlik, mobilde tam genişlik */
.product-config-toggle-wrap .product-config-toggle-inner {
  width: 100%;
  min-width: 0;
}
.product-config-toggle-wrap .product-config-toggle {
  min-width: 0;
  white-space: nowrap;
}
@media (max-width: 575.98px) {
  .product-config-toggle-wrap {
    width: 100%;
    margin-left: 0;
  }
}

/* ========== design-service: Tüm select kolonları eşit, select kutuları aynı genişlik ========== */
.design-service-options .design-service-select-col {
  flex: 1 1 0;
  min-width: 120px;
}
.design-service-options .design-service-select-wrap {
  width: 100%;
  max-width: 180px;
}
.design-service-options .design-service-select-wrap .select2-container {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 180px !important;
}
@media (max-width: 767.98px) {
  .design-service-options .design-service-select-wrap,
  .design-service-options .design-service-select-wrap .select2-container {
    max-width: 100% !important;
  }
}

/* ========== Fiyat Hesapla: Yardım popup (soru işareti tıklanınca) ========== */
.product-config__help-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.product-config__help {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s, transform 0.2s;
}
.product-config__help:hover {
  opacity: 0.9;
}
.product-config__help-popup {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 1060;
  width: 280px;
  max-width: 90vw;
  padding: 0;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  text-align: left;
  pointer-events: none;
}
.product-config__help-popup::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: #dee2e6;
}
.product-config__help-popup::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: #fff;
}
.product-config__help-popup[hidden] {
  display: none !important;
}
.product-config__help-popup-title {
  display: block;
  padding: 10px 12px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #2C2C2C;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
  border-radius: 8px 8px 0 0;
}
.product-config__help-popup-body {
  display: block;
  padding: 12px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #495057;
}
