/* === Sabit WA butonu === */
#wa-btn {
  position: fixed;
  bottom: 50px;
  right: 20px;
  background-color: #005f63;
  color: white;
  padding: 10px 16px 10px 12px;
  border-radius: 25px;
  cursor: pointer;
  z-index: 9999;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  gap: 10px;
}
#wa-btn:focus { outline: 2px solid #1ebc57; outline-offset: 2px; }

#wa-btn img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: white;
  padding: 2px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* === WhatsApp küçük form kutucuğu === */
#wa-modal {
  display: none;
  position: fixed;
  bottom: 110px;
  right: 20px;
  background: #f8f5ef;
  padding: 35px 15px 15px 15px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  max-width: 320px;
  width: 90%;
  font-family: "Poppins", sans-serif;
  z-index: 10000;
  box-sizing: border-box;
}

#wa-modal input,
#wa-modal textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
  font-size: 16px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}


#wa-send {
  width: 100%;
  max-width: 360px;
  background-color: #005f63;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  box-sizing: border-box;
}
#wa-send:hover { background-color: #1ebc57; }
#wa-send img { width: 32px; height: 32px; display: inline-block; }

#wa-close {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 24px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  line-height: 1;
  width: 24px;
  height: 24px;
  text-align: center;
  border: 0;
  background: transparent;
}
#wa-close:hover { color: #d00; }

#wa-error { color: red; font-size: 13px; margin-top: 5px; }

#wa-captcha-area {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
}
#wa-captcha-area .cf-turnstile { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
#wa-captcha-area iframe { border-radius: 6px !important; }

#ht-ctc-chat, .ht-ctc-chat, .ht-ctc-button { display: none !important; }

/* RESPONSIVE – Mobilde WA butonunu küçült */
@media (max-width: 767px) {
  #wa-send {
    max-width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-family: "Poppins", sans-serif;
  }
  #wa-send img { width: 28px; height: 28px; }
}

/* Yeni içerik – buton yazıları */
.wa-text { display: flex; flex-direction: column; line-height: 1.2; text-align: right; font-family: "Poppins", sans-serif; }
.wa-main { font-weight: 600; font-size: 15px; color: white; }
.wa-sub  { font-size: 12px; font-weight: 400; color: #ceab5e; margin-top: 2px; }
.wa-pin  { font-size: 10px; color: #ceab5e; }

/* ====== Seçim Kutucuğu (Form | WhatsApp) ====== */
#wa-choice {
  display: none;
  position: fixed;
  bottom: 110px;
  right: 20px;
  background: #f8f5ef;
  padding: 20px 16px 16px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  max-width: 320px;
  width: 90%;
  font-family: "Poppins", sans-serif;
  z-index: 10001; /* WA modal’dan bir tık yüksek */
  box-sizing: border-box;
}
#wa-choice .wa-x{
  position:absolute; top:8px; right:10px;
  font-size:22px; font-weight:700; color:#333; cursor:pointer; line-height:1;
  border:0; background:transparent;
}
#wa-choice .wa-x:hover{ color:#d00; }

.wa-choice-title{ margin: 0 0 6px; font-size:16px; font-weight:600; color:#0c3a3c; }
.wa-choice-desc { margin: 0 0 12px; font-size:14px; color:#444; }

#wa-choice .wa-btn-primary,
#wa-choice .wa-btn-outline{
  width: 100%;
  border-radius: 8px;
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
  font-size: 15px;
}

#wa-choice .wa-btn-primary{
  background:#005f63; color:#fff; border:none;
}
#wa-choice .wa-btn-primary:hover{ background:#1ebc57; }

#wa-choice .wa-btn-outline{
  background:#fff; color:#005f63; border:2px solid #005f63;
}
#wa-choice .wa-btn-outline:hover{
  background:#005f63; color:#fff;
}

.wa-choice-hint{
  display:block; margin-top:6px; color:#888; font-size:12px;
}

@media (max-width:767px){
  #wa-choice{ right:12px; left:12px; max-width:none; width:auto; }
}

/* ====== CF7 Fallback Modal ====== */
/* Kök eleman: z-index etkili olsun ve tüm ekranı kaplasın */
#wa-cf7-modal {
  position: fixed;
  inset: 0;              /* top/right/bottom/left: 0 */
  z-index: 999999999;
  display: none;         /* JS ile aç/kapat */
}

/* Karanlık arka plan */
#wa-cf7-modal .wa-cf7-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

/* Diyalog kutusu: ekranda ortalanır, yüksekliği sınırlı */
#wa-cf7-modal .wa-cf7-dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 92vh;        /* ⇐ taşma kontrolü */
  display: flex;           /* içerik boyutlandırma için */
}

/* İçerik: sütun düzeni, başlık sabit, gövde kayar */
#wa-cf7-modal .wa-cf7-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  overflow: hidden;        /* başlık/gövde taşmasını gizle */
  display: flex;
  flex-direction: column;
  max-height: 92vh;        /* ⇐ taşma kontrolü */
}

/* Başlık: sabit kalsın */
#wa-cf7-modal .wa-cf7-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}
#wa-cf7-modal .wa-cf7-header h5 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
#wa-cf7-modal .wa-cf7-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

/* GÖVDE: yalnızca burası kaydırılır */
#wa-cf7-modal .wa-cf7-body {
  padding: 14px 16px;
  overflow: auto;                 /* ⇐ DİKEY SCROLL */
  -webkit-overflow-scrolling: touch; /* iOS daha akıcı */
}

/* Küçük ekranlarda kenar ve yükseklik ayarı */
@media (max-width: 480px) {
  #wa-cf7-modal .wa-cf7-dialog {
    width: calc(100% - 16px);
    max-height: 94vh;
  }
  #wa-cf7-modal .wa-cf7-body {
    padding: 12px;
  }
}

/* CF7 modal AÇIKKEN (display:block) sayfa scroll'unu kapat */
html:has(#wa-cf7-modal[style*="display: block"]),
html:has(#wa-cf7-modal[style*="display:block"]),
/* JS ile class verirsen bunu da yakalar */
html:has(#wa-cf7-modal.wa-cf7-open) {
  overflow: hidden;
  overscroll-behavior: none; /* mobilde overscroll/pull-to-refresh'i azaltır */
}

.wa-btn-with-ico {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.wa-btn-with-ico .wa-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}
.wa-btn-primary img,
.wa-btn-outline img {
  filter: invert(0); /* koyu temalarda ikon görünürlüğü */
}


