:root {
  --cc-wine: #7f291f;
  --cc-wine-dark: #5d1d16;
  --cc-cream: #fbf7f1;
  --cc-ink: #271d1a;
  --cc-muted: #675b56;
  --cc-border: #ddd2ca;
  --cc-focus: #1769aa;
}

.cc-banner[hidden],
.cc-dialog[hidden],
.cc-external-placeholder[hidden] {
  display: none !important;
}

.cc-banner {
  position: fixed;
  z-index: 10000;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.35rem;
  color: var(--cc-ink);
  background: #fff;
  border: 1px solid var(--cc-border);
  border-radius: 18px;
  box-shadow: 0 18px 55px rgba(39, 29, 26, .22);
}

.cc-banner h2,
.cc-dialog h2 {
  margin: 0 0 .55rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  line-height: 1.2;
}

.cc-banner p,
.cc-dialog p {
  margin: 0;
  color: var(--cc-muted);
  line-height: 1.55;
}

.cc-banner a,
.cc-dialog a {
  color: var(--cc-wine);
  font-weight: 700;
}

.cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  margin-top: 1.1rem;
}

.cc-button {
  min-height: 46px;
  padding: .7rem 1rem;
  color: var(--cc-wine);
  background: #fff;
  border: 2px solid var(--cc-wine);
  border-radius: 999px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.cc-button:hover {
  background: var(--cc-cream);
}

.cc-button--primary {
  color: #fff;
  background: var(--cc-wine);
}

.cc-button--primary:hover {
  background: var(--cc-wine-dark);
}

.cc-button:focus-visible,
.cc-switch input:focus-visible + span,
.cookie-policy-button:focus-visible {
  outline: 3px solid var(--cc-focus);
  outline-offset: 3px;
}

.cc-dialog {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 0;
  color: var(--cc-ink);
  background: #fff;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.cc-dialog::backdrop {
  background: rgba(21, 15, 13, .65);
}

.cc-dialog__head,
.cc-dialog__body,
.cc-dialog__foot {
  padding: 1.25rem 1.4rem;
}

.cc-dialog__head,
.cc-dialog__foot {
  background: var(--cc-cream);
}

.cc-dialog__head {
  border-bottom: 1px solid var(--cc-border);
}

.cc-dialog__body {
  overflow: auto;
}

.cc-dialog__foot {
  border-top: 1px solid var(--cc-border);
}

.cc-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .6rem 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--cc-border);
}

.cc-option:last-child {
  border-bottom: 0;
}

.cc-option strong {
  display: block;
  margin-bottom: .25rem;
}

.cc-option p {
  grid-column: 1 / -1;
  font-size: .94rem;
}

.cc-always-on {
  color: #38613d;
  font-size: .85rem;
  font-weight: 800;
}

.cc-switch {
  position: relative;
  display: inline-flex;
}

.cc-switch input {
  position: absolute;
  opacity: 0;
}

.cc-switch span {
  display: block;
  width: 52px;
  height: 29px;
  background: #918783;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease;
}

.cc-switch span::after {
  content: "";
  display: block;
  width: 23px;
  height: 23px;
  margin: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  transition: transform .2s ease;
}

.cc-switch input:checked + span {
  background: var(--cc-wine);
}

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

.cc-external-placeholder {
  display: grid;
  min-height: 260px;
  place-content: center;
  padding: 2rem;
  text-align: center;
  color: var(--cc-ink);
  background: var(--cc-cream);
  border: 1px dashed var(--cc-border);
  border-radius: 14px;
}

.cc-external-placeholder p {
  max-width: 48ch;
  margin: 0 auto 1rem;
}

.cookie-policy-button {
  padding: 0;
  color: var(--cc-wine);
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (max-width: 600px) {
  .cc-banner {
    right: .65rem;
    bottom: .65rem;
    left: .65rem;
    padding: 1rem;
  }

  .cc-actions,
  .cc-actions .cc-button {
    width: 100%;
  }
}

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