/* HeidSec W_FULL.11 cookie and consent UI */
.heidsec-cookie-banner,
.heidsec-consent-modal {
  color: #0f172a;
  font-family: var(--font-sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.heidsec-cookie-banner {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9998;
  width: min(1040px, calc(100vw - 28px));
  transform: translateX(-50%);
  border: 1px solid rgba(226, 232, 240, 0.98);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 54px rgba(15, 23, 42, 0.14);
  padding: 18px;
  backdrop-filter: blur(18px);
}

.heidsec-cookie-banner[hidden],
.heidsec-consent-modal[hidden] {
  display: none !important;
}

.heidsec-cookie-banner__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.heidsec-cookie-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.heidsec-cookie-title {
  margin: 0 0 6px;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.2;
}

.heidsec-cookie-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.heidsec-cookie-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 13px;
}

.heidsec-cookie-links a,
.heidsec-consent-modal a {
  color: #2563eb;
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 99, 235, 0.22);
}

.heidsec-cookie-actions,
.heidsec-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.heidsec-consent-btn {
  min-height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-weight: 700;
  padding: 0 16px;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.heidsec-consent-btn:hover {
  border-color: rgba(37, 99, 235, 0.55);
  transform: translateY(-1px);
}

.heidsec-consent-btn--primary {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.heidsec-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(10px);
}

.heidsec-consent-dialog {
  width: min(780px, 100%);
  max-height: min(780px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 90px rgba(15, 23, 42, 0.2);
  padding: 22px;
}

.heidsec-consent-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.heidsec-consent-head h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 30px);
}

.heidsec-consent-head p,
.heidsec-consent-category p,
.heidsec-consent-note {
  color: #475569;
  line-height: 1.55;
}

.heidsec-consent-close {
  width: 42px;
  height: 42px;
  border: 1px solid #dbe3ef;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
  font-size: 22px;
}

.heidsec-consent-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  padding: 15px;
}

.heidsec-consent-category h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.heidsec-consent-category p {
  margin: 0;
  font-size: 13px;
}

.heidsec-consent-toggle {
  position: relative;
  display: inline-flex;
  width: 58px;
  height: 32px;
}

.heidsec-consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.heidsec-consent-slider {
  position: absolute;
  inset: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e2e8f0;
  transition: background 160ms ease, border-color 160ms ease;
}

.heidsec-consent-slider::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #94a3b8;
  transition: transform 160ms ease, background 160ms ease;
}

.heidsec-consent-toggle input:checked + .heidsec-consent-slider {
  border-color: rgba(37, 99, 235, 0.8);
  background: rgba(37, 99, 235, 0.18);
}

.heidsec-consent-toggle input:checked + .heidsec-consent-slider::before {
  transform: translateX(26px);
  background: #2563eb;
}

.heidsec-consent-toggle input:disabled + .heidsec-consent-slider {
  opacity: 0.78;
  cursor: not-allowed;
}

.heidsec-consent-note {
  margin: 16px 0 0;
  font-size: 12px;
}

.heidsec-consent-actions {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .heidsec-cookie-banner {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(360px, calc(100vw - 24px));
    padding: 14px;
  }

  .heidsec-cookie-banner__inner,
  .heidsec-consent-category {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .heidsec-cookie-title {
    font-size: 18px;
  }

  .heidsec-cookie-text,
  .heidsec-cookie-links {
    font-size: 12px;
  }

  .heidsec-cookie-actions,
  .heidsec-consent-actions {
    justify-content: stretch;
  }

  .heidsec-consent-btn {
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heidsec-consent-btn,
  .heidsec-consent-slider,
  .heidsec-consent-slider::before {
    transition: none;
  }
}

/* V3: permanent reopen control and reliable mobile closing */
.heidsec-cookie-reopen{
  position:fixed;
  left:max(14px,env(safe-area-inset-left));
  bottom:max(14px,env(safe-area-inset-bottom));
  z-index:9997;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:0 13px;
  border:1px solid rgba(89,215,255,.34);
  border-radius:999px;
  background:#071522;
  color:#eaf6ff;
  box-shadow:0 12px 34px rgba(0,0,0,.3);
  cursor:pointer;
  font:700 12px/1 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;
}
.heidsec-cookie-reopen:hover,.heidsec-cookie-reopen:focus-visible{border-color:#59d7ff;outline:0;box-shadow:0 0 0 3px rgba(89,215,255,.12),0 12px 34px rgba(0,0,0,.3)}
html.heidsec-consent-open,html.heidsec-consent-open body{overscroll-behavior:none}
.heidsec-consent-head{position:sticky;top:-22px;z-index:3;margin:-22px -22px 16px;padding:22px 22px 13px;background:#fff;border-bottom:1px solid #e2e8f0;border-radius:20px 20px 0 0}
.heidsec-consent-close{flex:0 0 44px;touch-action:manipulation;position:relative;z-index:5}
@media(max-width:760px){
  .heidsec-cookie-reopen{left:10px;bottom:max(10px,env(safe-area-inset-bottom));width:42px;height:42px;min-height:42px;padding:0;justify-content:center;border-radius:50%}
  .heidsec-cookie-reopen span:last-child{display:none}
  .heidsec-consent-modal{align-items:end;padding:0;background:rgba(5,11,18,.64)}
  .heidsec-consent-dialog{width:100%;max-height:min(88dvh,760px);border-radius:22px 22px 0 0;border-bottom:0;padding:18px 16px calc(18px + env(safe-area-inset-bottom));overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
  .heidsec-consent-head{top:-18px;margin:-18px -16px 14px;padding:18px 16px 12px;border-radius:22px 22px 0 0}
  .heidsec-consent-close{width:46px;height:46px;font-size:26px;background:#f8fafc}
}

/* V10: keep the settings control above chat widgets and make mobile dismissal reliable. */
.heidsec-cookie-banner{z-index:2147482998}
.heidsec-cookie-reopen{z-index:2147482999}
.heidsec-consent-modal{z-index:2147483000;touch-action:manipulation}
.heidsec-cookie-reopen[hidden]{display:none!important}
.heidsec-consent-dialog{overscroll-behavior:contain}
html.heidsec-consent-open body{touch-action:none}
@media(max-width:760px){
  .heidsec-cookie-reopen{bottom:max(68px,calc(env(safe-area-inset-bottom) + 12px))}
  .heidsec-consent-actions{padding-bottom:max(4px,env(safe-area-inset-bottom))}
  .heidsec-consent-actions .heidsec-consent-btn{min-height:48px}
}
