.myrhem-cookie-banner,
.myrhem-cookie-modal {
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  font-family: var(--font-body, Inter, "Helvetica Neue", Arial, sans-serif);
  letter-spacing: 0;
}

.myrhem-cookie-banner[hidden],
.myrhem-cookie-modal[hidden] {
  display: none !important;
}

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

.myrhem-cookie-banner {
  bottom: calc(22px + var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)));
  left: calc(22px + var(--safe-area-left, env(safe-area-inset-left, 0px)));
  max-height: calc(100dvh - 44px);
  overflow: auto;
  position: fixed;
  width: min(560px, calc(100vw - 44px));
  z-index: 2147482200;
}

.myrhem-cookie-banner__body {
  align-items: start;
  backdrop-filter: blur(var(--blur, 22px));
  background: var(--bg, #fffef7);
  background: color-mix(in srgb, var(--bg, #fffef7) 94%, transparent);
  border: 1px solid rgba(31, 71, 37, 0.13);
  border-radius: var(--radius, 18px);
  box-shadow: var(--shadow, 0 8px 24px rgba(0, 0, 0, 0.08));
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(18px, 3vw, 24px);
}

.myrhem-cookie-banner__copy {
  max-width: 42rem;
  min-width: 0;
}

.myrhem-cookie-eyebrow {
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  font-family: ABCDiatypeBold, var(--font-body, Inter, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.4;
  margin: 0 0 8px;
  opacity: 0.62;
  text-transform: uppercase;
}

.myrhem-cookie-banner h2,
.myrhem-cookie-modal h2,
.myrhem-cookie-category h3 {
  color: var(--primary, #1f4725);
  font-family: var(--font-heading, "Libre Baskerville", Georgia, serif);
  letter-spacing: 0;
  margin: 0;
}

.myrhem-cookie-banner h2 {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.18;
}

.myrhem-cookie-banner p,
.myrhem-cookie-modal p {
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  font-size: 0.92rem;
  line-height: 1.62;
  margin: 8px 0 0;
  opacity: 0.9;
}

.myrhem-cookie-banner p {
  max-width: 42ch;
}

.myrhem-cookie-banner__actions,
.myrhem-cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-start;
}

.myrhem-cookie-button {
  align-items: center;
  appearance: none;
  background: var(--cream, #fdfaf3);
  border: 1px solid rgba(31, 71, 37, 0.18);
  border-radius: 999px;
  color: var(--primary, #1f4725);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  justify-content: center;
  line-height: 1.1;
  min-height: 42px;
  padding: 10px 16px;
  text-align: center;
  text-decoration: none;
  transition: var(--transition, all 0.3s ease);
  white-space: nowrap;
}

.myrhem-cookie-button:hover,
.myrhem-cookie-button:focus-visible {
  background: var(--sand, #f6f1e7);
  border-color: rgba(31, 71, 37, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.myrhem-cookie-button:active {
  transform: translateY(0);
}

.myrhem-cookie-button--primary {
  background: var(--primary, #1f4725);
  border-color: var(--primary, #1f4725);
  color: var(--text-light, #fff);
}

.myrhem-cookie-button--primary:hover,
.myrhem-cookie-button--primary:focus-visible {
  background: var(--primary-dark, #16391c);
  border-color: var(--primary-dark, #16391c);
}

.myrhem-cookie-button--text {
  background: transparent;
  border-color: transparent;
  color: var(--primary, #1f4725);
  padding-inline: 10px;
}

.myrhem-cookie-button--text:hover,
.myrhem-cookie-button--text:focus-visible {
  background: rgba(31, 71, 37, 0.07);
  border-color: rgba(31, 71, 37, 0.12);
}

.myrhem-cookie-modal {
  display: grid;
  inset: 0;
  padding:
    calc(16px + var(--safe-area-top, env(safe-area-inset-top, 0px)))
    calc(16px + var(--safe-area-right, env(safe-area-inset-right, 0px)))
    calc(16px + var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)))
    calc(16px + var(--safe-area-left, env(safe-area-inset-left, 0px)));
  place-items: center;
  position: fixed;
  z-index: 2147482300;
}

.myrhem-cookie-modal__backdrop {
  background: rgba(15, 28, 46, 0.38);
  inset: 0;
  position: absolute;
}

.myrhem-cookie-modal__panel {
  background: var(--bg, #fffef7);
  border: 1px solid rgba(31, 71, 37, 0.13);
  border-radius: var(--radius, 18px);
  box-shadow: 0 24px 70px rgba(15, 28, 46, 0.18);
  display: grid;
  max-height: min(820px, calc(100dvh - 32px));
  overflow: hidden;
  position: relative;
  width: min(860px, 100%);
}

.myrhem-cookie-modal__header {
  align-items: start;
  background: linear-gradient(180deg, var(--bg, #fffef7), var(--cream, #fdfaf3));
  border-bottom: 1px solid rgba(31, 71, 37, 0.11);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: clamp(20px, 4vw, 28px) clamp(20px, 4vw, 28px) 18px;
}

.myrhem-cookie-modal h2 {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.15;
}

.myrhem-cookie-icon-button {
  appearance: none;
  background: var(--cream, #fdfaf3);
  border: 1px solid rgba(31, 71, 37, 0.15);
  border-radius: 999px;
  color: var(--primary, #1f4725);
  cursor: pointer;
  display: grid;
  font-size: 1.35rem;
  height: 40px;
  line-height: 1;
  place-items: center;
  width: 40px;
}

.myrhem-cookie-icon-button:hover,
.myrhem-cookie-icon-button:focus-visible {
  background: var(--sand, #f6f1e7);
  outline: none;
}

.myrhem-cookie-meta {
  background: var(--cream, #fdfaf3);
  border-bottom: 1px solid rgba(31, 71, 37, 0.09);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px clamp(20px, 4vw, 28px);
}

.myrhem-cookie-meta span {
  background: rgba(31, 71, 37, 0.07);
  border-radius: 999px;
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  font-size: 0.76rem;
  font-weight: 600;
  opacity: 0.82;
  padding: 5px 9px;
}

.myrhem-cookie-modal__categories {
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 18px clamp(20px, 4vw, 28px) 22px;
}

.myrhem-cookie-category {
  background: var(--cream, #fdfaf3);
  border: 1px solid rgba(31, 71, 37, 0.12);
  border-radius: calc(var(--radius, 18px) - 6px);
  overflow: hidden;
}

.myrhem-cookie-category header {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}

.myrhem-cookie-category h3 {
  font-size: 1rem;
}

.myrhem-cookie-category p {
  font-size: 0.88rem;
}

.myrhem-cookie-toggle {
  align-items: center;
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  cursor: pointer;
  display: inline-grid;
  font-size: 0.8rem;
  font-weight: 600;
  gap: 8px;
  grid-template-columns: auto minmax(0, auto);
  line-height: 1.2;
  opacity: 0.86;
}

.myrhem-cookie-toggle input {
  height: 1px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.myrhem-cookie-toggle__switch {
  background: rgba(31, 71, 37, 0.16);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(31, 71, 37, 0.08);
  height: 24px;
  position: relative;
  transition: var(--transition, all 0.3s ease);
  width: 44px;
}

.myrhem-cookie-toggle__switch::after {
  background: var(--bg, #fffef7);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 28, 46, 0.18);
  content: "";
  height: 18px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: var(--transition, all 0.3s ease);
  width: 18px;
}

.myrhem-cookie-toggle input:checked + .myrhem-cookie-toggle__switch {
  background: var(--primary, #1f4725);
}

.myrhem-cookie-toggle input:checked + .myrhem-cookie-toggle__switch::after {
  transform: translateX(20px);
}

.myrhem-cookie-toggle input:focus-visible + .myrhem-cookie-toggle__switch {
  outline: 2px solid rgba(31, 71, 37, 0.28);
  outline-offset: 2px;
}

.myrhem-cookie-toggle input:disabled + .myrhem-cookie-toggle__switch {
  opacity: 0.72;
}

.myrhem-cookie-details {
  background: var(--sand, #f6f1e7);
  background: color-mix(in srgb, var(--sand, #f6f1e7) 62%, var(--bg, #fffef7));
  border-top: 1px solid rgba(31, 71, 37, 0.1);
}

.myrhem-cookie-details summary {
  color: var(--primary, #1f4725);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 12px 16px;
}

.myrhem-cookie-details__list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.myrhem-cookie-detail {
  border-top: 1px solid rgba(31, 71, 37, 0.09);
  display: grid;
  gap: 3px;
  padding-top: 10px;
}

.myrhem-cookie-detail strong {
  color: var(--primary, #1f4725);
  font-size: 0.88rem;
}

.myrhem-cookie-detail span,
.myrhem-cookie-detail small {
  color: var(--text-dark, rgba(15, 28, 46, 0.78));
  font-size: 0.78rem;
  opacity: 0.74;
}

.myrhem-cookie-detail p {
  font-size: 0.84rem;
  margin: 0;
}

.myrhem-cookie-modal__footer {
  background: var(--bg, #fffef7);
  border-top: 1px solid rgba(31, 71, 37, 0.11);
  padding: 16px clamp(20px, 4vw, 28px) 20px;
}

.myrhem-cookie-modal-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .myrhem-cookie-banner {
    bottom: calc(14px + var(--safe-area-bottom, env(safe-area-inset-bottom, 0px)));
    left: calc(14px + var(--safe-area-left, env(safe-area-inset-left, 0px)));
    right: calc(14px + var(--safe-area-right, env(safe-area-inset-right, 0px)));
    width: auto;
  }

  .myrhem-cookie-banner__body,
  .myrhem-cookie-category header {
    grid-template-columns: 1fr;
  }

  .myrhem-cookie-banner__actions,
  .myrhem-cookie-modal__footer {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .myrhem-cookie-button {
    min-height: 44px;
    white-space: normal;
    width: 100%;
  }

  .myrhem-cookie-banner p {
    max-width: none;
  }

  .myrhem-cookie-modal {
    align-items: end;
    padding: 0;
  }

  .myrhem-cookie-modal__panel {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    max-height: calc(100dvh - 10px);
    width: 100%;
  }

  .myrhem-cookie-modal__header,
  .myrhem-cookie-meta,
  .myrhem-cookie-modal__categories,
  .myrhem-cookie-modal__footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

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