:root {
  --phrc-cookie-red: #cc1b2e;
  --phrc-cookie-red-dark: #a81523;
  --phrc-cookie-ink: #14130f;
  --phrc-cookie-cream: #f5f2ec;
  --phrc-cookie-white: #ffffff;
  --phrc-cookie-muted: #6f6c65;
}

.phrc-cookie-banner[hidden],
.phrc-cookie-modal[hidden],
.phrc-external-placeholder[hidden],
[data-phrc-consent-src][hidden] {
  display: none !important;
}

.phrc-cookie-banner {
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 99990;
  margin: auto;
  max-width: 1180px;
  color: var(--phrc-cookie-white);
  background: var(--phrc-cookie-ink);
  border-top: 4px solid var(--phrc-cookie-red);
  border-radius: 8px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.38);
  font-family: inherit;
}

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

.phrc-cookie-kicker {
  display: block;
  margin-bottom: 5px;
  color: #ff5668;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.phrc-cookie-title {
  margin: 0 0 7px;
  color: var(--phrc-cookie-white);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.15;
}

.phrc-cookie-copy,
.phrc-cookie-modal p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.97rem;
  line-height: 1.55;
}

.phrc-cookie-copy a,
.phrc-cookie-modal a {
  color: var(--phrc-cookie-white);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

.phrc-cookie-button {
  min-height: 45px;
  padding: 11px 18px;
  color: var(--phrc-cookie-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 4px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.1;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.phrc-cookie-button:hover,
.phrc-cookie-button:focus-visible {
  color: var(--phrc-cookie-white);
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--phrc-cookie-white);
}

.phrc-cookie-button:focus-visible,
.phrc-cookie-switch input:focus-visible + span {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.phrc-cookie-button--primary {
  background: var(--phrc-cookie-red);
  border-color: var(--phrc-cookie-red);
}

.phrc-cookie-button--primary:hover,
.phrc-cookie-button--primary:focus-visible {
  background: var(--phrc-cookie-red-dark);
  border-color: var(--phrc-cookie-red-dark);
}

.phrc-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 8, 7, 0.76);
  backdrop-filter: blur(4px);
}

.phrc-cookie-modal__dialog {
  position: relative;
  width: min(100%, 720px);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  color: var(--phrc-cookie-white);
  background: var(--phrc-cookie-ink);
  border-top: 5px solid var(--phrc-cookie-red);
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.55);
}

.phrc-cookie-modal__head,
.phrc-cookie-modal__body,
.phrc-cookie-modal__footer {
  padding: 24px 28px;
}

.phrc-cookie-modal__head {
  padding-right: 68px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.phrc-cookie-modal__head h2 {
  margin: 2px 0 8px;
  color: var(--phrc-cookie-white);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.phrc-cookie-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--phrc-cookie-white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  font: inherit;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.phrc-cookie-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 19px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.phrc-cookie-choice:first-child {
  padding-top: 0;
}

.phrc-cookie-choice:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.phrc-cookie-choice h3 {
  margin: 0 0 5px;
  color: var(--phrc-cookie-white);
  font-size: 1.08rem;
}

.phrc-cookie-choice p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
}

.phrc-cookie-switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

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

.phrc-cookie-switch input + span {
  position: relative;
  display: block;
  width: 50px;
  height: 28px;
  background: #5f5d58;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.phrc-cookie-switch input + span::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  background: var(--phrc-cookie-white);
  border-radius: 50%;
  content: "";
  transition: transform 160ms ease;
}

.phrc-cookie-switch input:checked + span {
  background: var(--phrc-cookie-red);
}

.phrc-cookie-switch input:checked + span::after {
  transform: translateX(22px);
}

.phrc-cookie-switch input:disabled + span {
  cursor: not-allowed;
  opacity: 0.72;
}

.phrc-cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.phrc-external-frame {
  position: relative;
  width: 100%;
  min-height: 280px;
}

.phrc-external-frame > iframe {
  width: 100%;
}

.phrc-external-placeholder {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 34px 24px;
  color: var(--phrc-cookie-ink);
  background:
    linear-gradient(135deg, rgba(204, 27, 46, 0.08), transparent 55%),
    var(--phrc-cookie-cream);
  border: 1px solid rgba(20, 19, 15, 0.16);
  border-radius: 6px;
  text-align: center;
}

.phrc-external-placeholder__inner {
  max-width: 520px;
}

.phrc-external-placeholder h3 {
  margin: 0 0 8px;
  color: var(--phrc-cookie-ink);
  font-size: 1.35rem;
}

.phrc-external-placeholder p {
  margin: 0 0 18px;
  color: var(--phrc-cookie-muted);
  line-height: 1.55;
}

.phrc-external-placeholder .phrc-cookie-button {
  color: var(--phrc-cookie-white);
  background: var(--phrc-cookie-red);
  border-color: var(--phrc-cookie-red);
}

body.phrc-cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 860px) {
  .phrc-cookie-banner__inner {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .phrc-cookie-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .phrc-cookie-banner {
    right: 8px;
    bottom: 8px;
    left: 8px;
  }

  .phrc-cookie-banner__inner,
  .phrc-cookie-modal__head,
  .phrc-cookie-modal__body,
  .phrc-cookie-modal__footer {
    padding: 20px;
  }

  .phrc-cookie-actions,
  .phrc-cookie-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .phrc-cookie-button {
    width: 100%;
  }
}

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