/* ============================================================
   TKE Texas — Cookie Consent Banner & Preference Center styles
   Namespaced with "tke-cc-" to avoid collisions with site styles.
   ============================================================ */

#tke-cc-root,
#tke-cc-root * {
  box-sizing: border-box;
}

#tke-cc-root {
  font-family: "Mulish", sans-serif;
}

/* ---------------- Banner ---------------- */

.tke-cc-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: #ffffff;
  border-top: 4px solid #AD2624;
  box-shadow: 0 -2px 14px rgba(0, 0, 0, 0.2);
  padding: 18px 24px;
}

.tke-cc-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.tke-cc-banner-text {
  flex: 1 1 420px;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.5;
}

.tke-cc-banner-title {
  margin: 0 0 4px 0;
  font-family: "Mulish-Bold", sans-serif;
  font-size: 16px;
  color: #222222;
}

.tke-cc-banner-text p {
  margin: 0 0 4px 0;
}

.tke-cc-banner-text p:last-child {
  margin-bottom: 0;
}

.tke-cc-link {
  color: #AD2624;
  text-decoration: underline;
}

.tke-cc-link:hover,
.tke-cc-link:focus-visible {
  color: #2463EB;
}

.tke-cc-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---------------- Buttons ---------------- */

.tke-cc-btn {
  font-family: "Mulish", sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid #AD2624;
  line-height: 1.2;
  white-space: nowrap;
}

.tke-cc-btn-solid {
  background-color: #AD2624;
  color: #ffffff;
}

.tke-cc-btn-solid:hover,
.tke-cc-btn-solid:focus-visible {
  filter: brightness(0.9);
}

.tke-cc-btn-outline {
  background-color: #ffffff;
  color: #AD2624;
}

.tke-cc-btn-outline:hover,
.tke-cc-btn-outline:focus-visible {
  background-color: rgba(173, 38, 36, 0.08);
}

.tke-cc-btn:focus-visible,
.tke-cc-close:focus-visible,
.tke-cc-toggle:focus-visible {
  outline: 3px solid #2463EB;
  outline-offset: 2px;
}

/* ---------------- Overlay + Modal ---------------- */

.tke-cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999999;
}

.tke-cc-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000000;
  width: 92%;
  max-width: 560px;
  max-height: 88vh;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.tke-cc-modal-inner {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.tke-cc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background-color: #AD2624;
  flex-shrink: 0;
}

.tke-cc-modal-header h2 {
  margin: 0;
  font-family: "Mulish-Bold", sans-serif;
  font-size: 19px;
  color: #ffffff;
}

.tke-cc-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 9px;
  border-radius: 4px;
}

.tke-cc-close:hover,
.tke-cc-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
}

.tke-cc-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  color: #475569;
  font-size: 14.5px;
  line-height: 1.5;
}

.tke-cc-modal-intro {
  margin: 0 0 16px 0;
}

.tke-cc-category {
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.tke-cc-category:first-of-type {
  border-top: none;
  padding-top: 0;
}

.tke-cc-category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.tke-cc-category-name {
  font-family: "Mulish-Bold", sans-serif;
  font-size: 15px;
  color: #222222;
}

.tke-cc-category-desc {
  margin: 6px 0 0 0;
  color: #919194;
  font-size: 13.5px;
}

/* Toggle switch (role="switch" button) */

.tke-cc-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background-color: #919194;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.tke-cc-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: left 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.tke-cc-toggle[aria-checked="true"] {
  background-color: #AD2624;
}

.tke-cc-toggle[aria-checked="true"] .tke-cc-toggle-knob {
  left: 22px;
}

.tke-cc-toggle-locked {
  display: inline-flex;
  align-items: center;
  background-color: #AD2624;
  border-radius: 4px;
  padding: 5px 10px;
  flex-shrink: 0;
}

.tke-cc-toggle-locked .tke-cc-toggle-label {
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tke-cc-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---------------- reCAPTCHA consent gate ---------------- */

.tke-cc-recaptcha-gate {
  border: 1px dashed #AD2624;
  border-radius: 6px;
  background: rgba(173, 38, 36, 0.08);
  padding: 14px;
  margin-bottom: 15px;
  text-align: center;
}

.tke-cc-recaptcha-gate p {
  margin: 0 0 10px 0;
  font-size: 13.5px;
  color: #475569;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 700px) {
  .tke-cc-banner {
    padding: 16px;
  }

  .tke-cc-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .tke-cc-banner-actions .tke-cc-btn {
    flex: 1 1 0;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tke-cc-toggle-knob {
    transition: none;
  }
}
