:root {
  --consent-black: #111111;
  --consent-white: #ffffff;
  --consent-soft: #f4f4f1;
  --consent-border: #c9c9c3;
  --consent-focus: #d8b52f;
  --consent-muted: #555555;
}

#local-consent-manager[hidden],
.consent-placeholder[hidden] {
  display: none !important;
}

.consent-dialog-open {
  overflow: hidden;
}

.consent-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  background: rgba(0, 0, 0, 0.58);
}

.consent-panel {
  position: fixed;
  z-index: 2147483001;
  left: 50%;
  bottom: 24px;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  transform: translateX(-50%);
  border: 1px solid var(--consent-black);
  border-radius: 14px;
  background: var(--consent-white);
  color: var(--consent-black);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34);
  padding: 28px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

.consent-panel h2 {
  margin: 0 0 12px;
  color: var(--consent-black);
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
  line-height: 1.2;
}

.consent-panel p {
  margin: 0 0 14px;
  color: var(--consent-muted);
  font-size: 0.98rem;
}

.consent-privacy-link a {
  color: var(--consent-black);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.consent-button,
.consent-inline-button,
.consent-translation-button,
.cookie-settings-link {
  appearance: none;
  border: 1px solid var(--consent-black);
  border-radius: 7px;
  cursor: pointer;
  font: inherit;
}

.consent-button {
  min-height: 46px;
  padding: 10px 14px;
  font-weight: 700;
}

.consent-button-primary {
  background: var(--consent-black);
  color: var(--consent-white);
}

.consent-button-secondary {
  background: var(--consent-white);
  color: var(--consent-black);
}

.consent-button:hover,
.consent-inline-button:hover,
.consent-translation-button:hover {
  filter: brightness(0.92);
}

.consent-button:focus-visible,
.consent-inline-button:focus-visible,
.consent-translation-button:focus-visible,
.cookie-settings-link:focus-visible,
.consent-close:focus-visible,
.consent-category input:focus-visible {
  outline: 3px solid var(--consent-focus);
  outline-offset: 3px;
}

.consent-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: 0;
  background: transparent;
  color: var(--consent-black);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
}

.consent-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 10px 0;
  border: 1px solid var(--consent-border);
  border-radius: 9px;
  background: var(--consent-white);
  padding: 14px 16px;
}

.consent-category-required {
  background: var(--consent-soft);
}

.consent-category div {
  display: grid;
  gap: 3px;
}

.consent-category span {
  color: var(--consent-muted);
  font-size: 0.9rem;
}

.consent-category input {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  accent-color: var(--consent-black);
}

.consent-embed-container {
  position: relative;
  overflow: hidden;
  background: var(--consent-soft);
}

.consent-placeholder {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  min-height: 160px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 9px;
  padding: 24px;
  text-align: center;
  background: var(--consent-soft);
  color: var(--consent-black);
  font-family: Arial, Helvetica, sans-serif;
}

.consent-placeholder span {
  max-width: 420px;
  color: var(--consent-muted);
  font-size: 0.9rem;
}

.consent-inline-button {
  margin-top: 5px;
  padding: 9px 14px;
  background: var(--consent-black);
  color: var(--consent-white);
  font-weight: 700;
}

.consent-translation-button {
  min-width: 38px;
  min-height: 30px;
  padding: 4px 8px;
  background: transparent;
  color: inherit;
  font-weight: 700;
}

.cookie-settings-link {
  display: inline-block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 680px) {
  .consent-panel {
    bottom: 10px;
    width: calc(100% - 20px);
    max-height: calc(100vh - 20px);
    padding: 22px 18px;
  }

  .consent-actions {
    grid-template-columns: 1fr;
  }

  .consent-category {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-panel,
  .consent-button,
  .consent-inline-button {
    scroll-behavior: auto;
    transition: none;
  }
}
