.ehn-cookie-banner,
.ehn-modal-backdrop,
.ehn-modal,
.ehn-cookie-banner * {
  box-sizing: border-box;
}

.ehn-cookie-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 99998;
  background: #fff;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .25);
}

.ehn-cookie-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.ehn-cookie-text { max-width: 740px; }
.ehn-cookie-text h3,
.ehn-cookie-text p,
.ehn-modal h2,
.ehn-modal h4,
.ehn-modal p { margin-top: 0; }

.ehn-cookie-actions,
.ehn-modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ehn-cookie-actions { width: max-content; }

.ehn-btn {
  min-width: 160px;
  padding: 15px 20px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

.ehn-btn-primary { background: #ff9210; color: #fff; }
.ehn-btn-secondary { background: #e9eef5; color: #111; }
.ehn-btn-tertiary { border: 1px solid #ccc; background: transparent; color: #666; font-size: 14px; font-style: italic; }

.ehn-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .45);
}

.ehn-modal {
  position: relative;
  width: 700px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 30px;
  border-radius: 14px;
  background: #fff;
  color: #111;
}

.ehn-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 30px;
  line-height: 1;
}

.ehn-cookie-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 18px 0;
  border-bottom: 1px solid #eee;
}

.ehn-modal-actions { margin-top: 24px; }
.ehn-locked-toggle { color: #7f9410; font-weight: 700; white-space: nowrap; }

.ehn-switch { position: relative; flex: 0 0 55px; width: 55px; height: 28px; }
.ehn-switch input { position: absolute; opacity: 0; }
.ehn-switch span[aria-hidden="true"] { position: absolute; inset: 0; border-radius: 40px; background: #ccc; cursor: pointer; }
.ehn-switch span[aria-hidden="true"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ehn-switch input:checked + span { background: #0054a6; }
.ehn-switch input:checked + span::before { transform: translateX(27px); }
.ehn-switch input:focus-visible + span { outline: 3px solid #ffbf47; outline-offset: 2px; }

.ehn-preferences-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0054a6;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
}

.ehn-debug-panel {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  width: 320px;
  max-width: calc(100vw - 40px);
  padding: 16px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-size: 13px;
}
.ehn-debug-panel pre { white-space: pre-wrap; }

[hidden] { display: none !important; }

@media (max-width: 760px) {
  .ehn-cookie-content { flex-direction: column; }
  .ehn-cookie-actions { width: 100%; }
  .ehn-cookie-actions .ehn-btn { width: 100%; }
  .ehn-cookie-group { align-items: flex-start; }
  .ehn-modal-actions .ehn-btn { width: 100%; }
}

.ehn-cookie-policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
  font-size: 14px;
}

.ehn-cookie-policy-links a {
  color: #0054a6;
  text-decoration: underline;
}

.ehn-cookie-policy-links a:hover,
.ehn-cookie-policy-links a:focus {
  text-decoration-thickness: 2px;
}
