#consent-manager,
#consent-manager * {
  box-sizing: border-box;
}

.consent-panel[hidden],
.consent-details[hidden],
.consent-reopen[hidden] {
  display: none !important;
}

.consent-panel {
  position: fixed;
  z-index: 2147483647;
  right: 24px;
  bottom: 24px;
  left: 24px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  overflow: hidden;
  color: #33271f;
  background: rgba(255, 250, 244, .98);
  border: 1px solid rgba(255, 149, 24, .32);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(82, 43, 10, .2);
  font-family: inherit;
  backdrop-filter: blur(14px);
}

.consent-panel__main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 30px;
  align-items: center;
  padding: 22px 24px;
}

.consent-panel__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: #b65a00;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.consent-panel h2 {
  margin: 0 0 6px;
  color: #33271f;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.15;
}

.consent-panel p {
  max-width: 720px;
  margin: 0;
  color: #67584c;
  font-size: 14px;
  line-height: 1.55;
}

.consent-panel__actions,
.consent-details__footer {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.consent-button,
.consent-reopen {
  appearance: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease;
}

.consent-button {
  min-height: 44px;
  padding: 12px 17px;
}

.consent-button:hover,
.consent-reopen:hover {
  transform: translateY(-2px);
}

.consent-button:focus-visible,
.consent-reopen:focus-visible,
.consent-switch input:focus-visible + span {
  outline: 3px solid rgba(255, 149, 24, .42);
  outline-offset: 3px;
}

.consent-button--primary {
  color: #fff;
  background: #f58d12;
  box-shadow: 0 7px 18px rgba(220, 107, 0, .22);
}

.consent-button--primary:hover {
  background: #df7800;
  box-shadow: 0 9px 22px rgba(220, 107, 0, .3);
}

.consent-button--outline {
  color: #8b490d;
  background: transparent;
  border: 1px solid rgba(139, 73, 13, .42);
}

.consent-button--outline:hover {
  background: #fff2df;
  border-color: #c66a0c;
}

.consent-button--ghost {
  color: #67584c;
  background: #eee6dd;
}

.consent-button--ghost:hover {
  color: #33271f;
  background: #e3d8cc;
}

.consent-details {
  padding: 0 24px 22px;
  border-top: 1px solid rgba(139, 73, 13, .14);
}

.consent-category {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid rgba(139, 73, 13, .11);
}

.consent-category strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.consent-category p {
  font-size: 12px;
}

.consent-category__required {
  flex: 0 0 auto;
  color: #8b490d;
  font-size: 11px;
  font-weight: 800;
}

.consent-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 27px;
}

.consent-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent-switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cfc2b6;
  cursor: pointer;
  transition: background-color .18s ease;
}

.consent-switch span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 19px;
  height: 19px;
  content: '';
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}

.consent-switch input:checked + span {
  background: #f58d12;
}

.consent-switch input:checked + span::after {
  transform: translateX(21px);
}

.consent-details__footer {
  justify-content: space-between;
  padding-top: 16px;
}

.consent-details__footer a {
  color: #8b490d;
  font-size: 13px;
  font-weight: 700;
}

.consent-reopen {
  position: fixed;
  z-index: 2147483646;
  bottom: 14px;
  left: 14px;
  min-height: 36px;
  padding: 9px 13px;
  color: #6e3b0e;
  background: rgba(255, 250, 244, .94);
  border: 1px solid rgba(139, 73, 13, .28);
  box-shadow: 0 5px 18px rgba(82, 43, 10, .13);
  backdrop-filter: blur(10px);
}

@media (max-width: 850px) {
  .consent-panel__main {
    grid-template-columns: 1fr;
    gap: 17px;
  }

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

  .consent-button--primary {
    grid-column: 1 / -1;
    grid-row: 1;
  }
}

@media (max-width: 520px) {
  .consent-panel {
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 14px;
  }

  .consent-panel__main,
  .consent-details {
    padding-right: 16px;
    padding-left: 16px;
  }

  .consent-panel__main {
    padding-top: 18px;
    padding-bottom: 18px;
  }

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

  .consent-button--primary {
    grid-column: auto;
  }

  .consent-button {
    width: 100%;
  }

  .consent-category {
    gap: 12px;
  }

  .consent-details__footer {
    align-items: stretch;
  }
}

@media (prefers-reduced-motion: reduce) {
  .consent-button,
  .consent-reopen,
  .consent-switch span,
  .consent-switch span::after {
    transition: none;
  }
}
