/**
 * intl-tel-input Mobile Fix
 * Bu dosya tüm formlarda mobil uyumluluğu sağlar
 * Ülke seçim dropdown'ının mobilde görünmesini garanti eder
 */

/* Global intl-tel-input dropdown z-index fix */
.iti__country-list {
  z-index: 99999 !important;
}

.iti__dropdown-content {
  z-index: 99999 !important;
}

/* Mobile-specific positioning fixes */
@media (max-width: 1024px) {
  /* Ensure form panels don't clip dropdown */
  .left-talep-form-panel,
  .special-form-panel {
    overflow: visible !important;
  }
  
  /* Keep form content scrollable */
  .left-talep-form-content,
  .special-form-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  
  .iti__country-list {
    position: fixed !important;
    z-index: 100000 !important; /* Higher than form panels (z-index: 101) */
    max-width: 90vw !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    max-height: 60vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  .iti__dropdown-content {
    z-index: 100000 !important; /* Higher than form panels (z-index: 101) */
    position: fixed !important;
  }
  
  /* Ensure iti container is also above form */
  .left-talep-form-panel .iti--container,
  .special-form-panel .iti--container {
    z-index: 100000 !important;
  }
  
  /* Ensure dropdown is above modals */
  .iti__country-list.iti__country-list--dropup {
    bottom: auto !important;
    top: 50% !important;
    transform: translateX(-50%) translateY(-50%) !important;
  }
}

/* Tablet and small screens */
@media (max-width: 768px) {
  .iti__country-list {
    max-width: 95vw !important;
    max-height: 50vh !important;
    border-radius: 10px !important;
  }
  
  .iti__search-input {
    font-size: 16px !important; /* Prevent zoom on iOS */
    padding: 12px 15px !important;
  }
  
  .iti__country {
    padding: 14px 15px !important;
    min-height: 48px !important; /* Better touch targets */
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .iti__country-list {
    max-width: 98vw !important;
    max-height: 45vh !important;
  }
}

/* Prevent body scroll when dropdown is open on mobile */
@media (max-width: 1024px) {
  body.iti-mobile {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
  }
}

/* Dark mode support (if not already styled) */
.iti__country-list {
  background: #0F1B25 !important;
  border: 1px solid #4A5363 !important;
}

.iti__country {
  color: #fff !important;
  border-bottom: 1px solid #4A5363 !important;
}

.iti__country:hover,
.iti__country.iti__highlight {
  background: rgba(255, 255, 255, 0.05) !important;
}

.iti__search-input {
  background: #0F1B25 !important;
  color: #fff !important;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.iti__search-input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

.iti__search-input:focus {
  border-bottom-color: #fac25a !important;
  background: #1f2b35 !important;
}

/* Ensure dropdown appears above everything */
.iti--container {
  z-index: 99999 !important;
}

/* Mobile: Higher z-index to appear above form panels */
@media (max-width: 1024px) {
  .iti--container {
    z-index: 100000 !important;
  }
}
@media (max-width: 764px) {
  .iti--flexible-dropdown-width .iti__country-list {
      white-space: normal;
      margin-top: 0px;
      position: relative !important;
  }
}
.iti--fullscreen-popup .iti__dropdown-content {
  display: flex;
  flex-direction: column;
  max-height: 100%;
  position: relative !important;
  margin-top: 287px;
}
.iti--fullscreen-popup.iti--container {
  background-color: transparent;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  position: fixed;
  padding: var(--iti-mobile-popup-margin);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.iti {
  position: relative;
  display: inline-block;
  width: 100%;
}

.iti--inline-dropdown .iti__country-list {
  max-height: 185px;  
   max-width: 265px;
   min-width: 265px;
}


.left-talep-form .iti--inline-dropdown .iti__country-list {
    max-height: 185px;
    max-width: 100%;
    min-width: 265px;
    width: 390px;
}