/**
 * Boyraz Teklif / Bilgi Formu — Yapısal CSS
 * Renk ve tipografi Elementor kontrolleri üzerinden yönetilir;
 * buradaki değerler nötr varsayılanlardır.
 */

.boyraz-tf {
    display: block;
    width: 100%;
}

.boyraz-tf-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.boyraz-tf-field {
    flex: 1 1 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.boyraz-tf-field--half {
    flex: 1 1 calc(50% - 7px);
    min-width: 160px;
}

.boyraz-tf-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
    opacity: 0.85;
}

.boyraz-tf-input {
    width: 100%;
    padding: 13px 16px;
    font: inherit;
    font-size: 14px;
    color: inherit;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(128, 128, 128, 0.35);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.boyraz-tf-input:focus {
    border-color: var(--e-global-color-accent, #a98a5b);
}
.boyraz-tf-input.is-error {
    border-color: #d63638;
}

.boyraz-tf-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}
/* Açılır listenin kendi seçenekleri koyu temalarda okunur kalsın */
.boyraz-tf-select option {
    color: #1d2327;
    background: #ffffff;
}

.boyraz-tf-textarea {
    resize: vertical;
    min-height: 96px;
}

/* Alan hata mesajı */
.boyraz-tf-err {
    display: block;
    min-height: 0;
    font-size: 11.5px;
    color: #d63638;
    margin-top: 4px;
}
.boyraz-tf-err:empty { display: none; }

/* KVKK onay satırı */
.boyraz-tf-kvkk {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 16px 0 0;
    font-size: 12.5px;
    line-height: 1.55;
    cursor: pointer;
    opacity: 0.9;
}
.boyraz-tf-kvkk input[type="checkbox"] {
    margin: 3px 0 0;
    flex-shrink: 0;
    accent-color: var(--e-global-color-accent, #a98a5b);
}

/* Honeypot — ekran dışı (display:none bazı botlarca tespit edilir) */
.boyraz-tf-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Gönder butonu */
.boyraz-tf-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    margin-top: 18px;
    padding: 14px 24px;
    border: none;
    border-radius: 4px;
    background: var(--e-global-color-accent, #a98a5b);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}
.boyraz-tf-submit:hover  { opacity: 0.92; }
.boyraz-tf-submit:disabled {
    opacity: 0.6;
    cursor: wait;
}
.boyraz-tf-submit-arrow {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.boyraz-tf-submit:hover .boyraz-tf-submit-arrow {
    transform: translateX(4px);
}

/* Gönderim sırasında hafif soluklaştır */
.boyraz-tf.is-sending .boyraz-tf-fields { opacity: 0.6; }

/* Başarı sonrası alanlar gizlenir, mesaj kalır */
.boyraz-tf.is-done .boyraz-tf-fields,
.boyraz-tf.is-done .boyraz-tf-kvkk,
.boyraz-tf.is-done .boyraz-tf-submit {
    display: none;
}

/* Sonuç mesajı */
.boyraz-tf-msg {
    margin-top: 14px;
    padding: 13px 16px;
    border-radius: 4px;
    font-size: 13.5px;
    line-height: 1.5;
}
.boyraz-tf-msg.is-success {
    background: rgba(0, 163, 42, 0.12);
    border: 1px solid rgba(0, 163, 42, 0.45);
    color: #00a32a;
}
.boyraz-tf-msg.is-error {
    background: rgba(214, 54, 56, 0.1);
    border: 1px solid rgba(214, 54, 56, 0.4);
    color: #d63638;
}

@media (max-width: 560px) {
    .boyraz-tf-field--half { flex-basis: 100%; }
}

/* ════════════════════════════════════════════════════════════════
   Tasarım Temaları
   Sınıf, Elementor prefix_class ile widget sarmalayıcısına eklenir
   (.boyraz-tf-theme-koyu vb). Stil sekmesi kontrolleri daha yüksek
   özgüllükle temanın üzerine yazar.
════════════════════════════════════════════════════════════════ */

/* ── Koyu (varsayılan): şeffaf alan + ince açık çerçeve ── */
.boyraz-tf-theme-koyu .boyraz-tf-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}
.boyraz-tf-theme-koyu .boyraz-tf-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.boyraz-tf-theme-koyu .boyraz-tf-kvkk,
.boyraz-tf-theme-koyu .boyraz-tf-label { color: #ffffff; }

/* ── Açık: beyaz alanlar, koyu yazı ── */
.boyraz-tf-theme-acik .boyraz-tf-input {
    background: #ffffff;
    border-color: #d9d4cc;
    color: #2c2a27;
}
.boyraz-tf-theme-acik .boyraz-tf-input::placeholder { color: #9a948a; }
.boyraz-tf-theme-acik .boyraz-tf-kvkk,
.boyraz-tf-theme-acik .boyraz-tf-label { color: #4a463f; }

/* ── Cam: buzlu panel — görsel arkaplan üzerinde kullanım için ── */
.boyraz-tf-theme-cam .boyraz-tf {
    padding: 28px;
    border-radius: 14px;
    background: rgba(20, 18, 16, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.boyraz-tf-theme-cam .boyraz-tf-input {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    color: #ffffff;
}
.boyraz-tf-theme-cam .boyraz-tf-input::placeholder { color: rgba(255, 255, 255, 0.6); }
.boyraz-tf-theme-cam .boyraz-tf-kvkk,
.boyraz-tf-theme-cam .boyraz-tf-label { color: #ffffff; }
.boyraz-tf-theme-cam .boyraz-tf-submit { border-radius: 8px; }

/* ── Sade: yalnızca alt çizgi ── */
.boyraz-tf-theme-sade .boyraz-tf-input {
    background: transparent;
    border-width: 0 0 1px;
    border-radius: 0;
    padding-left: 2px;
    padding-right: 2px;
}
.boyraz-tf-theme-sade .boyraz-tf-select { background-position: right 2px center; }

/* ── Telefon: tek input görünümü (kod tetiği + numara aynı çerçevede) ──
   Sarmalayıcı .boyraz-tf-input sınıfını taşır: tema ve stil kontrolleri
   (arka plan, kenarlık, renk) doğrudan ona uygulanır; içerdekiler şeffaf. */
.boyraz-tf-tel {
    position: relative;
    display: flex;
    align-items: stretch;
    /* Sarmalayıcı ASLA dolgu almaz — boyut kontrolü değişkenlerle içeri geçer */
    padding: 0 !important;
}
.boyraz-tf-tel:focus-within {
    border-color: var(--e-global-color-accent, #a98a5b);
}
.boyraz-tf-tel:has(.is-error) {
    border-color: #d63638;
}

/* Kod tetiği
   !important zorunlu: tema/Elementor kit'inin genel input-buton stilleri
   (kenarlık, arka plan, gölge) bileşenin içine sızıp "kutu içinde kutu"
   görünümü yaratıyor — çerçeveyi YALNIZCA sarmalayıcı çizer */
.boyraz-tf-tel .boyraz-tf-tel-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    /* Ölçüler de kilitli: kit'in genel button padding/min-height değerleri
       (örn. 15px 30px) butonu şişirip tüm kutuyu diğer alanlardan
       yüksek gösteriyordu */
    padding: 0 11px 0 14px !important;
    margin: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1 !important;
    background: transparent !important;
    border: 0 !important;
    border-right: 1px solid rgba(128, 128, 128, 0.3) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    color: inherit;
    font: inherit !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    cursor: pointer;
    flex-shrink: 0;
}
.boyraz-tf-tel-bayrak {
    width: 20px !important;
    height: 15px !important;
    max-width: none !important;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    margin: 0 !important;
}
.boyraz-tf-tel-kod { line-height: 1; }
.boyraz-tf-tel-ok {
    width: 12px;
    height: 12px;
    opacity: 0.6;
}

/* Numara alanı — şeffaf, çerçeveyi sarmalayıcı çizer.
   !important zorunlu: kit'in input[type=tel] kuralları burada geçersiz */
.boyraz-tf-tel .boyraz-tf-tel-input,
.boyraz-tf-tel .boyraz-tf-tel-input:focus {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    height: auto !important;
    min-height: 0 !important;
    /* Dolgu, widget'ın "Alan İç Boşluğu" kontrolünden değişkenle gelir —
       böylece diğer alanlarla yükseklik her ayarda eşit kalır */
    padding: var(--bp-tf-pad-t, 13px) var(--bp-tf-pad-r, 16px) var(--bp-tf-pad-b, 13px) 12px !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    color: inherit !important;
    /* Tipografi sarmalayıcıdan miras alınır (kullanıcının tipografi
       kontrolü sarmalayıcıya uygulanır); kit'in input kuralları geçemez */
    font: inherit !important;
    -webkit-appearance: none;
    appearance: none;
}
.boyraz-tf-tel .boyraz-tf-tel-input::placeholder {
    color: inherit;
    opacity: 0.55;
}

/* Açılır liste — okunabilirlik için her temada açık zemin */
.boyraz-tf-tel-dd {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    min-width: 280px;
    max-width: 340px;
    background: #ffffff;
    border: 1px solid #ddd6cb;
    border-radius: 10px;
    box-shadow: 0 12px 34px rgba(20, 18, 16, 0.22);
    overflow: hidden;
}
.boyraz-tf-tel-dd .boyraz-tf-tel-ara,
.boyraz-tf-tel-dd .boyraz-tf-tel-ara:focus {
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 11px 14px;
    margin: 0;
    border: 0 !important;
    border-bottom: 1px solid #eee8de !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    font: inherit;
    font-size: 13px;
    color: #1d2327 !important;
    background: #faf8f5 !important;
}
.boyraz-tf-tel-dd .boyraz-tf-tel-ara::placeholder { color: #9a948a; opacity: 1; }
.boyraz-tf-tel-liste {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 236px;
    overflow-y: auto;
}
.boyraz-tf-tel-liste li {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    color: #1d2327;
}
/* display:flex, [hidden] özniteliğinin UA display:none kuralını ezer —
   arama filtresinin gizlediği satırlar için açıkça geri alınmalı */
.boyraz-tf-tel-liste li[hidden] {
    display: none;
}
.boyraz-tf-tel-dd[hidden] {
    display: none;
}
.boyraz-tf-tel-liste li:hover,
.boyraz-tf-tel-liste li:focus {
    background: #fbf5ec;
    outline: none;
}
.boyraz-tf-tel-liste li.is-secili {
    background: #f5efe4;
}
.boyraz-tf-tel-ad {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.boyraz-tf-tel-iso {
    font-size: 10.5px;
    font-weight: 700;
    color: #9a948a;
    letter-spacing: 0.04em;
}
.boyraz-tf-tel-liste li b {
    font-weight: 600;
    color: #96794c;
}
.boyraz-tf-tel-bos {
    padding: 14px;
    text-align: center;
    font-size: 12.5px;
    color: #9a948a;
}

/* Sade temada ayraç çizgisi alt çizgi diliyle uyumlu kalsın */
.boyraz-tf-theme-sade .boyraz-tf-tel .boyraz-tf-tel-btn {
    border-right: 1px solid rgba(128, 128, 128, 0.25) !important;
    padding-left: 2px;
}
