/* =========================================================
   WA CLICK GUARD – CLEAN + PREMIUM (THEME MATCH)
   ========================================================= */

/* === Root / Variables === */
:root {
  --wa-bottom: 100px;
  --wa-gap: 2px;
  --wa-btn-height: 60px;

  --wa-pink: #08c4ac;
  --wa-pink-hover: #07b39c;
  --wa-pink-press: #059e89;

  --wa-teal: #005f63;
  --wa-teal-hover: #0a7c80;
  --wa-teal-press: #054d50;

  --wa-surface: #fffdf9;
  --wa-border: rgba(0,0,0,.06);

  --wa-shadow: 0 18px 55px rgba(0,0,0,.14);
  --wa-shadow-hover: 0 22px 70px rgba(0,0,0,.16);
}

@media (max-width: 767px) {
  :root {
    --wa-bottom: 100px;
  }
}

/* Floating Button */
#wa-btn {
  position: fixed;
  right: 20px;
  bottom: var(--wa-bottom);
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 10px;

  padding: 10px 16px 10px 12px;
  border-radius: 25px;

  background: var(--wa-pink);
  color: #fff;

  cursor: pointer;
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 600;

  box-shadow: 0 12px 30px rgba(0,0,0,.14);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

#wa-btn:hover {
  background: var(--wa-pink-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

#wa-btn:active {
  background: var(--wa-pink-press);
  transform: translateY(0);
}

#wa-btn:focus { outline: none; }
#wa-btn:focus-visible {
  outline: 2px solid var(--wa-pink-press);
  outline-offset: 2px;
}

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

.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: #fff; }
.wa-sub  { font-size: 12px; font-weight: 500; color: #000; margin-top: 2px; }
.wa-pin  { font-size: 10px; color: #ceab5e; }

@media (max-width: 767px) {
  #wa-btn { right: 15px; }
}

/* Shared panel base */
#wa-modal,
#wa-choice {
  display: none;
  position: fixed;
  right: 20px;
  bottom: calc(var(--wa-bottom) + var(--wa-btn-height) + var(--wa-gap));
  z-index: 10000;

  width: 90%;
  max-width: 250px;
  box-sizing: border-box;

  background: var(--wa-surface);
  border: 1px solid var(--wa-border);
  border-radius: 14px;
  box-shadow: var(--wa-shadow);

  font-family: "Poppins", sans-serif;
}

#wa-choice { z-index: 10001; }

@media (max-width: 767px) {
  #wa-choice{
    right: 20px;
    left: auto;
    width: 90%;
    max-width: 250px;
    padding: 35px 15px 15px;
  }
}

/* WA Modal */
#wa-modal {
  padding: 35px 15px 15px;
}

#wa-modal input,
#wa-modal textarea {
  width: 100%;
  margin-bottom: 12px;
  padding: 10px;

  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  background: #fff;

  box-sizing: border-box;
  font-size: 14px;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;

  transition: border-color .2s ease, box-shadow .2s ease;
}

#wa-modal input:focus,
#wa-modal textarea:focus {
  outline: none;
  border-color: rgba(0,95,99,.55);
  box-shadow: 0 0 0 3px rgba(0,95,99,.12);
}

#wa-send {
  width: 100%;
  max-width: 360px;
  padding: 10px;

  border: none;
  border-radius: 8px;

  background: var(--wa-teal);
  color: #fff;

  cursor: pointer;
  font-weight: 700;
  font-size: 14px;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  box-sizing: border-box;
  box-shadow: 0 10px 22px rgba(0,0,0,.10);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease;
}

#wa-send:hover {
  background: var(--wa-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0,0,0,.14);
}

#wa-send:active {
  background: var(--wa-teal-press);
  transform: translateY(0);
}

#wa-send img { width: 32px; height: 32px; display: inline-block; }

@media (max-width: 767px) {
  #wa-send { max-width: 100%; padding: 10px 14px; }
  #wa-send img { width: 28px; height: 28px; }
}

#wa-close {
  position: absolute;
  top: 8px;
  right: 10px;

  width: 24px;
  height: 24px;

  border: 0;
  background: transparent;

  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  text-align: center;

  color: #333;
  cursor: pointer;
}

#wa-close:hover { color: var(--wa-pink-press); }

#wa-error { color: #d00; font-size: 13px; margin-top: 6px; }

#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; }

/* Choice panel */
#wa-choice {
  padding: 18px 16px 14px;
}

#wa-choice .wa-x {
  position: absolute;
  top: 8px;
  right: 10px;

  border: 0;
  background: transparent;

  font-size: 22px;
  font-weight: 800;
  line-height: 1;

  color: #333;
  cursor: pointer;
}
#wa-choice .wa-x:hover { color: var(--wa-pink-press); }

.wa-choice-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #0c3a3c;
}
.wa-choice-desc {
  margin: 0 0 10px;
  font-size: 14px;
  color: #444;
}
.wa-choice-hint {
  display: block;
  margin-top: 8px;
  color: #888;
  font-size: 12px;
}

#wa-choice .wa-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

@media (max-width: 360px) {
  #wa-choice .wa-choice-grid { grid-template-columns: 1fr; }
}

#wa-choice .wa-choice-card {
  border-radius: 14px;
  padding: 12px 8px;
  min-height: 68px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  text-align: center;
  font-weight: 700;
  font-size: 14px;

  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, border-color .25s ease, color .25s ease;
}

#wa-choice .wa-choice-icon {
  width: 36px;
  height: 36px;
  display: block;
  opacity: .95;
}

#wa-choice .wa-choice-label {
  font-size: 13px;
  line-height: 1.15;
}

#wa-choice .wa-choice-card.wa-btn-primary {
  background: var(--wa-teal);
  color: #fff;
  border: 0;
}

#wa-choice .wa-choice-card.wa-btn-primary:hover {
  background: var(--wa-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0,0,0,.14);
}

#wa-choice .wa-choice-card.wa-btn-outline {
  background: #fff;
  color: var(--wa-teal);
  border: 2px solid rgba(0,95,99,.75);
}

#wa-choice .wa-choice-card.wa-btn-outline:hover {
  background: #f3fbfb;
  border-color: var(--wa-teal-hover);
  color: var(--wa-teal-hover);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0,0,0,.10);
}

/* Telefon kartı */
#wa-choice .wa-choice-card.wa-btn-call {
  background: #fff7f0;
  color: #9a4d00;
  border: 2px solid rgba(154, 77, 0, .35);
}

#wa-choice .wa-choice-card.wa-btn-call:hover {
  background: #fff1e2;
  border-color: rgba(154, 77, 0, .55);
  color: #7a3d00;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0,0,0,.10);
}

/* CF7 Fallback Modal */
#wa-cf7-modal {
  position: fixed;
  inset: 0;
  z-index: 999999999;
  display: none;
}

#wa-cf7-modal .wa-cf7-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

#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;

  display: flex;
}

#wa-cf7-modal .wa-cf7-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
  overflow: hidden;

  display: flex;
  flex-direction: column;
  max-height: 92vh;
}

#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: 700;
}

#wa-cf7-modal .wa-cf7-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#wa-cf7-modal .wa-cf7-body {
  padding: 14px 16px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

@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; }
}

html:has(#wa-cf7-modal[style*="display: block"]),
html:has(#wa-cf7-modal[style*="display:block"]),
html:has(#wa-cf7-modal.wa-cf7-open) {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Mobil */
@media (max-width: 767px){
  #wa-choice .wa-choice-grid{
    grid-template-columns: 1fr !important;
    gap: 4px;
  }

  #wa-choice .wa-choice-card{
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    min-height: 35px !important;
  }

  #wa-choice .wa-choice-icon{
    width: 30px !important;
    height: 30px !important;
  }

  #wa-choice .wa-choice-label{
    font-size: 14px !important;
  }
}