/* Tora Politikalar – CF7 Consent Section
   Prefix: tpol-cf7-  (unique, no conflicts) */


.tpol-cf7-consent {
  border-top: 1px solid #e5e7eb;
  margin-top: 18px;
  padding-top: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #374151;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Main row ── */
.tpol-cf7-main-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.tpol-cf7-check-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
}
.tpol-cf7-main-check {
  width: 17px;
  height: 17px;
  cursor: pointer;
  accent-color: var(--tpol-primary);
  flex-shrink: 0;
}

.tpol-cf7-main-content {
  flex: 1;
  min-width: 0;
}
.tpol-cf7-main-text {
  margin: 0;
  text-decoration: underline;
  text-decoration-color: #d1d5db;
  text-underline-offset: 2px;
}

.tpol-cf7-modal-link {
  color: var(--tpol-primary);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}
.tpol-cf7-modal-link:hover {
  color: var(--tpol-primary-d);
}

/* Expand arrow button */
.tpol-cf7-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  border: none;
  border-radius: 20px;
  color: #6b7280;
  cursor: pointer;
  padding: 3px 9px 3px 7px;
  margin-left: 7px;
  vertical-align: middle;
  gap: 3px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
  transition: background .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
}
.tpol-cf7-expand-btn svg {
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.tpol-cf7-expand-btn:hover {
  background: var(--tpol-primary-l);
  color: var(--tpol-primary);
}
.tpol-cf7-expand-btn:hover svg {
  color: var(--tpol-primary);
}
.tpol-cf7-expand-btn.tpol-cf7-expanded {
  background: var(--tpol-primary-l);
  color: var(--tpol-primary);
}
.tpol-cf7-expand-btn.tpol-cf7-expanded svg {
  transform: rotate(180deg);
  color: var(--tpol-primary);
}

/* ── Channel checkboxes ── */
.tpol-cf7-channels {
  max-height: 0;
  overflow: hidden;
  transition: max-height .28s cubic-bezier(.4,0,.2,1), opacity .2s;
  opacity: 0;
  margin-left: 27px;
}
.tpol-cf7-channels.tpol-cf7-channels-open {
  max-height: 130px;
  opacity: 1;
}

.tpol-cf7-channel-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13px;
  color: #374151;
  user-select: none;
}
.tpol-cf7-channel-row input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--tpol-primary);
  flex-shrink: 0;
}

/* ── IYS note ── */
.tpol-cf7-iys {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
  margin: 12px 0 10px;
  border-left: 3px solid #e5e7eb;
  padding-left: 10px;
  line-height: 1.5;
}
.tpol-cf7-iys a {
  color: var(--tpol-primary);
  text-decoration: none;
}
.tpol-cf7-iys a:hover {
  text-decoration: underline;
}

/* ── Policy links ── */
.tpol-cf7-policy-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
}
.tpol-cf7-error {
  display: block;
  color: #dc2626;
  font-size: 12px;
  margin: 3px 0 6px 23px;
}
.tpol-cf7-has-error .tpol-cf7-kvkk-check {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}

.tpol-cf7-kvkk-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 10px;
}
.tpol-cf7-kvkk-check {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--tpol-primary, #000000);
}
.tpol-cf7-ticari-row {
  margin-top: 8px;
  font-size: 13px;
}
.tpol-cf7-policy-link {
  color: var(--tpol-primary);
  text-decoration: none;
  font-weight: 500;
}
.tpol-cf7-policy-link:hover {
  text-decoration: underline;
}

/* ── Modal ── */
#tpol-cf7-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#tpol-cf7-modal-overlay.tpol-cf7-modal-open {
  opacity: 1;
  visibility: visible;
}

.tpol-cf7-modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: scale(.96) translateY(10px);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
#tpol-cf7-modal-overlay.tpol-cf7-modal-open .tpol-cf7-modal-box {
  transform: scale(1) translateY(0);
}
.tpol-cf7-modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  flex-shrink: 0;
}
#tpol-cf7-modal-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  flex: 1;
  padding-right: 12px;
  line-height: 1.3;
}
.tpol-cf7-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: #e5e7eb;
  color: #374151;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s, color .12s;
  font-family: inherit;
  line-height: 1;
}
.tpol-cf7-modal-close:hover {
  background: var(--tpol-primary);
  color: #fff;
}
#tpol-cf7-modal-body {
  overflow-y: auto;
  padding: 24px 28px 32px;
  flex: 1;
  font-size: 14px;
  line-height: 1.7;
  color: #1f2937;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
#tpol-cf7-modal-body h1 { font-size: 20px; font-weight: 700; color: #111827; margin: 0 0 8px; }
#tpol-cf7-modal-body h2 { font-size: 14px; font-weight: 700; color: var(--tpol-primary); margin: 22px 0 8px; padding-bottom: 5px; border-bottom: 2px solid var(--tpol-primary-l); }
#tpol-cf7-modal-body p  { margin: 0 0 10px; }
#tpol-cf7-modal-body ul { margin: 6px 0 12px 20px; }
#tpol-cf7-modal-body li { margin-bottom: 4px; }
#tpol-cf7-modal-body a  { color: var(--tpol-primary); }
#tpol-cf7-modal-body .tpol-contact-box {
  background: var(--tpol-primary-bg);
  border: 1px solid var(--tpol-primary-l);
  border-left: 4px solid var(--tpol-primary);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 12px 0;
}
#tpol-cf7-modal-body .tpol-contact-box p { margin: 0 0 3px; font-size: 13px; }

/* ── Avada modal (ayrı ID, aynı stiller) ── */
#tpol-avada-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
#tpol-avada-modal-overlay.tpol-cf7-modal-open {
  opacity: 1;
  visibility: visible;
}
#tpol-avada-modal-overlay .tpol-cf7-modal-box {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 700px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: scale(.96) translateY(10px);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
#tpol-avada-modal-overlay.tpol-cf7-modal-open .tpol-cf7-modal-box {
  transform: scale(1) translateY(0);
}

/* ── Koyu arka plan modu ── */
.tpol-cf7-consent.tpol-on-dark {
  color: rgba(255,255,255,.9);
  border-top-color: rgba(255,255,255,.15);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-kvkk-row,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-channel-row {
  color: rgba(255,255,255,.9);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-main-text {
  text-decoration-color: rgba(255,255,255,.25);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-policy-link,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-modal-link {
  color: rgba(255,255,255,.9);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-policy-link:hover,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-modal-link:hover {
  color: #fff;
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-expand-btn {
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.8);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-expand-btn:hover,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-expand-btn.tpol-cf7-expanded {
  background: rgba(255,255,255,.22);
  color: #fff;
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-iys {
  color: rgba(255,255,255,.6);
  border-left-color: rgba(255,255,255,.2);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-iys a {
  color: rgba(255,255,255,.8);
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-error {
  color: #fca5a5;
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-has-error .tpol-cf7-kvkk-check {
  outline-color: #fca5a5;
}
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-kvkk-check,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-main-check,
.tpol-cf7-consent.tpol-on-dark .tpol-cf7-channel-row input[type="checkbox"] {
  accent-color: #fff;
}

/* Mobile: bottom sheet */
@media (max-width: 640px) {
  #tpol-cf7-modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .tpol-cf7-modal-box {
    border-radius: 20px 20px 0 0;
    max-height: 92vh;
    transform: translateY(100%);
  }
  #tpol-cf7-modal-overlay.tpol-cf7-modal-open .tpol-cf7-modal-box {
    transform: translateY(0);
  }
  #tpol-cf7-modal-body {
    padding: 16px 16px 32px;
  }
}
