/* Koldere — Kontaktformular ek stilleri
   style.css'e DOKUNULMAZ. Yalnizca yeni alan tipleri (select, checkbox) ve
   gonderim durumu mesaji. Renkler mevcut degiskenlerden alinir. */

/* Honeypot: ekranda ve okuyucuda gizli, botlar doldurur. */
.kld-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* --- select: mevcut input gorunumunu devralir --- */
.contact-form select,
.kld-kontakt-form__select {
  width: 100%;
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
.contact-form select {
  border-radius: 14px;
  padding: 14px 40px 14px 16px;
}
.kld-kontakt-form__select {
  border-radius: 10px;
  padding: 12px 40px 12px 14px;
  background-color: var(--color-surface);
}
.kld-kontakt-form__select:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary) 18%, transparent);
}

/* --- Datenschutz onayi --- */
.kld-consent-field {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 4px;
  color: var(--color-text-muted);
  font-weight: 500;
  line-height: 1.45;
  cursor: pointer;
}
.kld-consent-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-brand-primary);
  cursor: pointer;
}
.kld-consent-field a {
  color: var(--color-brand-primary);
  text-decoration: underline;
}
.kld-consent-field span {
  min-width: 0;
}

/* --- Alan hatasi --- */
.kld-field-error {
  display: block;
  margin-top: 4px;
  color: var(--color-brand-primary);
  font-size: 0.78rem;
  font-weight: 600;
}
.kld-invalid,
.contact-form .kld-invalid,
.kld-kontakt-form .kld-invalid {
  border-color: var(--color-brand-primary);
}

/* --- Gonderim durumu --- */
.kld-form-status {
  margin: 12px 0 0;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 0.92rem;
  line-height: 1.5;
}
.kld-form-status[hidden] {
  display: none;
}
.kld-form-status--ok {
  background: var(--color-brand-accent-soft);
  color: var(--color-brand-secondary);
}
.kld-form-status--error {
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-secondary);
}
.kld-form-status a {
  color: var(--color-brand-primary);
  font-weight: 700;
}
.kld-form-status strong {
  display: block;
  margin-bottom: 2px;
}

/* Gonderim sirasinda buton */
.kld-sending {
  opacity: 0.6;
  pointer-events: none;
}

/* ============================================================
   Özel dropdown (Anliegen)
   Native <select>'in açılan listesi CSS ile stillendirilemez —
   işletim sistemi çizer. Masaüstünde markaya uygun bir liste
   gösterilir; native select DOM'da kalır (form gönderimi ve
   mevcut JS aynen çalışır). 900px altında native'e dönülür:
   dokunmatik cihazlarda sistem seçicisi daha iyi bir deneyim.
   ============================================================ */
.kld-select {
  position: relative;
  width: 100%;
}
.kld-select select {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
}
.kld-select__button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px 16px;
  background: var(--color-bg-main);
  color: var(--color-text-main);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.kld-kontakt-form .kld-select__button {
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--color-surface);
}
.kld-select__button:hover {
  border-color: color-mix(in srgb, var(--color-brand-primary) 45%, var(--color-border));
}
.kld-select__button:focus-visible,
.kld-select.is-open .kld-select__button {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary) 18%, transparent);
}
.kld-select__button[data-placeholder="true"] {
  color: var(--color-text-muted);
}
.kld-select__caret {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-right: 2px;
  border-right: 2px solid var(--color-text-muted);
  border-bottom: 2px solid var(--color-text-muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.25s ease;
}
.kld-select.is-open .kld-select__caret {
  transform: rotate(-135deg) translate(-3px, -3px);
}
.kld-select__list {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 288px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--color-surface);
  box-shadow: 0 18px 44px color-mix(in srgb, var(--color-brand-secondary) 22%, transparent);
  border: 1px solid var(--color-border-soft);
}
.kld-select__list[hidden] {
  display: none;
}
.kld-select__option {
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--color-text-main);
  font-size: 0.95rem;
  line-height: 1.35;
  cursor: pointer;
}
.kld-select__option:hover,
.kld-select__option.is-active {
  background: var(--color-bg-soft);
}
.kld-select__option[aria-selected="true"] {
  background: var(--color-brand-primary);
  color: var(--color-text-light);
  font-weight: 600;
}

/* Mobil / dokunmatik: native select geri gelir */
@media (max-width: 900px) {
  .kld-select__button,
  .kld-select__list {
    display: none;
  }
  .kld-select select {
    position: static;
    opacity: 1;
    pointer-events: auto;
    height: auto;
  }
}

/* 2026-08-17 — iOS Safari: onay kutusu dev gorunuyordu.
   width/height tanimliydi ama Safari, flex item olan checkbox'ta bu
   degerleri yok sayip -webkit varsayilan olcusunu uyguluyor.
   flex-basis + min/max ile olcu kilitlendi; gorunume (appearance)
   dokunulmadi, tik isareti yerli haliyle kaliyor. */
.kld-consent-field input[type="checkbox"]{
  flex:0 0 18px;
  min-width:18px;max-width:18px;
  min-height:18px;max-height:18px;
  align-self:flex-start;
}
