/**
 * Swift Commerce Cookie Consent
 *
 * Depends on swift-commerce-frontend.css. This file contains only the
 * feature-specific layout and maps structured appearance settings onto the
 * shared storefront design system.
 *
 * @version 3.0.0
 */

.swift-commerce-cookie-consent {
  --swift-commerce-cookie-consent-primary: var(--swift-commerce-color-primary);
  --swift-commerce-cookie-consent-primary-hover: var(--swift-commerce-color-primary-hover);
  --swift-commerce-cookie-consent-background: var(--swift-commerce-color-surface);
  --swift-commerce-cookie-consent-text: var(--swift-commerce-color-text);
  --swift-commerce-cookie-consent-muted: var(--swift-commerce-color-text-muted);
  --swift-commerce-cookie-consent-border: var(--swift-commerce-color-border);
  --swift-commerce-cookie-consent-radius: var(--swift-commerce-radius-xl);
  --swift-commerce-cookie-consent-shadow: var(--swift-commerce-shadow-lg);
  --swift-commerce-cookie-consent-overlay-color: #030712;
  --swift-commerce-cookie-consent-overlay-opacity: 0.45;
  --swift-commerce-cookie-consent-title-size: var(--swift-commerce-text-lg);
  --swift-commerce-cookie-consent-body-size: var(--swift-commerce-text-sm);
  --swift-commerce-cookie-consent-font-weight: var(--swift-commerce-font-normal);
  --swift-commerce-cookie-consent-font-family: var(--swift-commerce-font-family);
  --swift-commerce-cookie-consent-accept-background: var(--swift-commerce-cookie-consent-primary);
  --swift-commerce-cookie-consent-accept-text: var(--swift-commerce-color-on-primary);
  --swift-commerce-cookie-consent-decline: var(--swift-commerce-cookie-consent-text);
  --swift-commerce-cookie-consent-boxed-width: 80%;
  --swift-commerce-cookie-consent-max-width: 25rem;
  --swift-commerce-cookie-consent-duration: var(--swift-commerce-duration-slow);

  position: fixed;
  z-index: var(--swift-commerce-z-dialog);
  display: none;
  max-inline-size: calc(100vw - 2rem);
  color: var(--swift-commerce-cookie-consent-text);
  font-family: var(--swift-commerce-cookie-consent-font-family);
  font-size: var(--swift-commerce-cookie-consent-body-size);
  font-weight: var(--swift-commerce-cookie-consent-font-weight);
  line-height: var(--swift-commerce-leading-normal);
  isolation: isolate;
  container-name: swift-commerce-cookie-consent;
  container-type: inline-size;
}

.swift-commerce-cookie-consent.is-visible,
.swift-commerce-cookie-consent--preview {
  display: block;
}

.swift-commerce-cookie-consent[hidden],
.swift-commerce-cookie-consent [hidden] {
  display: none !important;
}

.swift-commerce-cookie-consent__overlay {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-color: var(--swift-commerce-cookie-consent-overlay-color);
  opacity: var(--swift-commerce-cookie-consent-overlay-opacity);
}

.swift-commerce-cookie-consent--overlay-blur .swift-commerce-cookie-consent__overlay {
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.swift-commerce-cookie-consent__surface {
  inline-size: 100%;
  overflow: hidden;
  color: var(--swift-commerce-cookie-consent-text);
  background-color: var(--swift-commerce-cookie-consent-background);
  border-radius: var(--swift-commerce-cookie-consent-radius);
  box-shadow: var(--swift-commerce-cookie-consent-shadow);
}

.swift-commerce-cookie-consent__primary {
  display: flex;
  align-items: flex-start;
  gap: var(--swift-commerce-space-4);
  padding: var(--swift-commerce-space-5);
}

.swift-commerce-cookie-consent__icon {
  display: inline-flex;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--swift-commerce-color-on-primary);
  background-color: var(--swift-commerce-cookie-consent-primary);
  border-radius: var(--swift-commerce-radius-pill);
}

.swift-commerce-cookie-consent__icon svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  fill: none;
  stroke: currentColor;
}

.swift-commerce-cookie-consent__content {
  min-inline-size: 0;
  flex: 1 1 auto;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__title {
  margin: 0;
  color: var(--swift-commerce-cookie-consent-text);
  font-family: var(--swift-commerce-font-family-heading);
  font-size: var(--swift-commerce-cookie-consent-title-size);
  font-weight: var(--swift-commerce-heading-weight);
  letter-spacing: var(--swift-commerce-heading-tracking);
  line-height: var(--swift-commerce-heading-leading);
  text-transform: var(--swift-commerce-heading-transform);
  text-wrap: balance;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__message {
  max-inline-size: 70ch;
  margin: var(--swift-commerce-space-2) 0 0;
  color: var(--swift-commerce-cookie-consent-muted);
  font-size: var(--swift-commerce-cookie-consent-body-size);
  font-weight: var(--swift-commerce-cookie-consent-font-weight);
  line-height: var(--swift-commerce-leading-relaxed);
  overflow-wrap: break-word;
  word-break: normal;
  text-wrap: pretty;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__privacy-link {
  margin-inline-start: var(--swift-commerce-space-1);
  color: var(--swift-commerce-cookie-consent-primary);
}

.swift-commerce-cookie-consent__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--swift-commerce-space-2);
  align-items: center;
}

.swift-commerce-cookie-consent .swift-commerce-button.swift-commerce-cookie-consent__button {
  min-block-size: var(--swift-commerce-control-height);
  padding-block: var(--swift-commerce-space-2);
  padding-inline: var(--swift-commerce-space-4);
  border-style: solid;
  border-width: 1px;
  border-radius: var(--swift-commerce-radius-control);
  box-shadow: none;
  font-family: inherit;
  font-size: var(--swift-commerce-text-sm);
  font-weight: var(--swift-commerce-font-medium);
  line-height: var(--swift-commerce-leading-normal);
  text-decoration: none;
  white-space: nowrap;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--accept {
  color: var(--swift-commerce-cookie-consent-accept-text);
  background-color: var(--swift-commerce-cookie-consent-accept-background);
  border-color: var(--swift-commerce-cookie-consent-accept-background);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--accept:hover {
  color: var(--swift-commerce-cookie-consent-accept-text);
  background-color: var(--swift-commerce-cookie-consent-primary-hover);
  border-color: var(--swift-commerce-cookie-consent-primary-hover);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--decline {
  color: var(--swift-commerce-cookie-consent-decline);
  background-color: transparent;
  border-color: var(--swift-commerce-cookie-consent-decline);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--decline:hover {
  color: var(--swift-commerce-cookie-consent-text);
  background-color: var(--swift-commerce-color-surface-subtle);
  border-color: var(--swift-commerce-cookie-consent-decline);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--settings {
  min-block-size: var(--swift-commerce-control-height-sm);
  padding-inline: var(--swift-commerce-space-2);
  color: var(--swift-commerce-cookie-consent-primary);
  background-color: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button--settings:hover {
  color: var(--swift-commerce-cookie-consent-primary-hover);
  background-color: transparent;
  border-color: transparent;
  text-decoration: none;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__button:focus-visible,
.swift-commerce-cookie-consent .swift-commerce-cookie-consent__close:focus-visible,
.swift-commerce-cookie-consent-reopen:focus-visible {
  outline: var(--swift-commerce-focus-width) solid var(--swift-commerce-color-focus);
  outline-offset: 3px;
}

/* Preferences panel. */
.swift-commerce-cookie-consent__preferences {
  padding: var(--swift-commerce-space-5);
  border-top: 1px solid var(--swift-commerce-cookie-consent-border);
}

.swift-commerce-cookie-consent__preferences-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--swift-commerce-space-4);
  padding-block-end: var(--swift-commerce-space-3);
  border-bottom: 1px solid var(--swift-commerce-cookie-consent-border);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__preferences-title {
  margin: 0;
  color: var(--swift-commerce-cookie-consent-text);
  font-family: var(--swift-commerce-font-family-heading);
  font-size: var(--swift-commerce-text-base);
  font-weight: var(--swift-commerce-font-semibold);
  line-height: var(--swift-commerce-leading-tight);
}

.swift-commerce-cookie-consent .swift-commerce-icon-button.swift-commerce-cookie-consent__close {
  inline-size: var(--swift-commerce-control-height-sm);
  block-size: var(--swift-commerce-control-height-sm);
  min-inline-size: var(--swift-commerce-control-height-sm);
  min-block-size: var(--swift-commerce-control-height-sm);
  padding: 0;
  color: var(--swift-commerce-cookie-consent-text);
  background-color: var(--swift-commerce-color-surface-subtle);
  border: 1px solid var(--swift-commerce-cookie-consent-border);
  border-radius: var(--swift-commerce-radius-control);
}

.swift-commerce-cookie-consent__close svg {
  inline-size: 1rem;
  block-size: 1rem;
}

.swift-commerce-cookie-consent__categories {
  display: flex;
  max-block-size: 18.75rem;
  flex-direction: column;
  gap: var(--swift-commerce-space-3);
  margin-block-start: var(--swift-commerce-space-4);
  padding-inline-end: var(--swift-commerce-space-1);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.swift-commerce-cookie-consent__category {
  padding: var(--swift-commerce-space-3) var(--swift-commerce-space-4);
  background-color: var(--swift-commerce-color-surface-subtle);
  border: 1px solid var(--swift-commerce-cookie-consent-border);
  border-radius: var(--swift-commerce-radius-lg);
}

.swift-commerce-cookie-consent__category-label {
  display: flex;
  align-items: center;
  gap: var(--swift-commerce-space-2);
  color: var(--swift-commerce-cookie-consent-text);
  cursor: pointer;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__category-checkbox {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  min-inline-size: 1.125rem;
  margin: 0;
  padding: 0;
  accent-color: var(--swift-commerce-cookie-consent-primary);
  cursor: pointer;
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__category-checkbox:disabled {
  cursor: not-allowed;
}

.swift-commerce-cookie-consent__category-name {
  font-size: var(--swift-commerce-text-sm);
  font-weight: var(--swift-commerce-font-medium);
}

.swift-commerce-cookie-consent__required {
  margin-inline-start: var(--swift-commerce-space-1);
  color: var(--swift-commerce-cookie-consent-muted);
  font-size: var(--swift-commerce-text-xs);
  font-weight: var(--swift-commerce-font-normal);
}

.swift-commerce-cookie-consent .swift-commerce-cookie-consent__category-description {
  margin: var(--swift-commerce-space-1) 0 0 calc(1.125rem + var(--swift-commerce-space-2));
  color: var(--swift-commerce-cookie-consent-muted);
  font-size: var(--swift-commerce-text-xs);
  line-height: var(--swift-commerce-leading-relaxed);
}

.swift-commerce-cookie-consent__preferences-actions {
  display: flex;
  justify-content: flex-end;
  margin-block-start: var(--swift-commerce-space-4);
  padding-block-start: var(--swift-commerce-space-4);
  border-top: 1px solid var(--swift-commerce-cookie-consent-border);
}

/* Positions and widths. */
.swift-commerce-cookie-consent--position-bottom {
  inset-inline: 0;
  inset-block-end: 0;
  max-inline-size: none;
}

.swift-commerce-cookie-consent--position-top {
  inset-inline: 0;
  inset-block-start: 0;
  max-inline-size: none;
}

.swift-commerce-cookie-consent--position-bottom-left {
  inset-inline-start: var(--swift-commerce-space-5);
  inset-block-end: var(--swift-commerce-space-5);
  inline-size: min(var(--swift-commerce-cookie-consent-max-width), calc(100vw - 2.5rem));
}

.swift-commerce-cookie-consent--position-bottom-right {
  inset-inline-end: var(--swift-commerce-space-5);
  inset-block-end: var(--swift-commerce-space-5);
  inline-size: min(var(--swift-commerce-cookie-consent-max-width), calc(100vw - 2.5rem));
}

.swift-commerce-cookie-consent--position-center {
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(31.25rem, calc(100vw - 2rem));
  transform: translate(-50%, -50%);
}

.swift-commerce-cookie-consent--position-bottom:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__surface,
.swift-commerce-cookie-consent--position-top:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__surface {
  border-radius: 0;
}

.swift-commerce-cookie-consent--position-bottom:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--position-top:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--swift-commerce-space-5);
  padding: var(--swift-commerce-space-4) var(--swift-commerce-space-10);
}

.swift-commerce-cookie-consent--has-icon.swift-commerce-cookie-consent--position-bottom:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--has-icon.swift-commerce-cookie-consent--position-top:not(.swift-commerce-cookie-consent--layout-boxed) .swift-commerce-cookie-consent__primary {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom,
.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
  inset-inline-start: 50%;
  inline-size: var(--swift-commerce-cookie-consent-boxed-width);
  max-inline-size: calc(100vw - 2rem);
  transform: translateX(-50%);
}

.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom {
  inset-block-end: var(--swift-commerce-space-4);
}

.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
  inset-block-start: var(--swift-commerce-space-4);
}

.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.swift-commerce-cookie-consent--has-icon.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--has-icon.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

/* Compact placements keep controls below copy so neither column can collapse. */
.swift-commerce-cookie-consent--position-bottom-left .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--position-bottom-right .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--position-center:not(.swift-commerce-cookie-consent--template-magazine) .swift-commerce-cookie-consent__primary {
  flex-direction: column;
  align-items: stretch;
}

.swift-commerce-cookie-consent--position-bottom-left .swift-commerce-cookie-consent__content,
.swift-commerce-cookie-consent--position-bottom-right .swift-commerce-cookie-consent__content,
.swift-commerce-cookie-consent--position-center:not(.swift-commerce-cookie-consent--template-magazine) .swift-commerce-cookie-consent__content,
.swift-commerce-cookie-consent--position-bottom-left .swift-commerce-cookie-consent__actions,
.swift-commerce-cookie-consent--position-bottom-right .swift-commerce-cookie-consent__actions,
.swift-commerce-cookie-consent--position-center:not(.swift-commerce-cookie-consent--template-magazine) .swift-commerce-cookie-consent__actions {
  inline-size: 100%;
}

/* Templates. */
.swift-commerce-cookie-consent--template-minimal {
  --swift-commerce-cookie-consent-max-width: 22rem;
  --swift-commerce-cookie-consent-shadow: var(--swift-commerce-shadow-md);
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__primary {
  gap: var(--swift-commerce-space-3);
  padding: var(--swift-commerce-space-4);
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__icon {
  display: none;
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__title {
  font-size: var(--swift-commerce-text-base);
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__message {
  font-size: var(--swift-commerce-text-xs);
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  inline-size: 100%;
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__button {
  inline-size: 100%;
  min-inline-size: 0;
  white-space: normal;
}

.swift-commerce-cookie-consent--template-minimal .swift-commerce-cookie-consent__button--settings {
  grid-column: 1 / -1;
}

.swift-commerce-cookie-consent--template-magazine {
  --swift-commerce-cookie-consent-radius: 0;
  --swift-commerce-cookie-consent-max-width: 38.75rem;
}

.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-center {
  inline-size: min(38.75rem, calc(100vw - 2rem));
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12.5rem;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__icon {
  display: none;
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__content {
  padding: var(--swift-commerce-space-6) var(--swift-commerce-space-8);
}

.swift-commerce-cookie-consent__eyebrow {
  display: inline-flex;
  margin-block-end: var(--swift-commerce-space-3);
  padding: var(--swift-commerce-space-1) var(--swift-commerce-space-2);
  color: var(--swift-commerce-cookie-consent-background);
  background-color: var(--swift-commerce-cookie-consent-text);
  font-size: 0.625rem;
  font-weight: var(--swift-commerce-font-bold);
  letter-spacing: 0.08em;
  line-height: var(--swift-commerce-leading-normal);
  text-transform: uppercase;
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--swift-commerce-text-2xl);
  font-weight: var(--swift-commerce-font-bold);
  letter-spacing: -0.02em;
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: var(--swift-commerce-space-6) var(--swift-commerce-space-5);
  border-inline-start: 1px solid var(--swift-commerce-cookie-consent-border);
}

.swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__button {
  inline-size: 100%;
  border-radius: 0;
}

.swift-commerce-cookie-consent__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--swift-commerce-space-5);
  margin-block-start: var(--swift-commerce-space-4);
  padding-block-start: var(--swift-commerce-space-3);
  border-top: 1px solid var(--swift-commerce-cookie-consent-border);
}

.swift-commerce-cookie-consent__stat {
  display: flex;
  flex-direction: column;
}

.swift-commerce-cookie-consent__stat-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: var(--swift-commerce-text-lg);
  font-weight: var(--swift-commerce-font-bold);
  line-height: var(--swift-commerce-leading-tight);
}

.swift-commerce-cookie-consent__stat-label {
  color: var(--swift-commerce-cookie-consent-muted);
  font-size: 0.625rem;
  font-weight: var(--swift-commerce-font-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.swift-commerce-cookie-consent__footer-note {
  margin: var(--swift-commerce-space-1) 0 0;
  color: var(--swift-commerce-cookie-consent-muted);
  font-size: 0.625rem;
  line-height: var(--swift-commerce-leading-snug);
}

.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-bottom,
.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-top {
  --swift-commerce-cookie-consent-max-width: none;
}

.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary {
  grid-template-columns: minmax(0, 1fr) 15rem;
}

/* Themes. Inline structured settings intentionally win over these defaults. */
.swift-commerce-cookie-consent--theme-dark {
  --swift-commerce-cookie-consent-background: var(--swift-commerce-gray-800);
  --swift-commerce-cookie-consent-text: var(--swift-commerce-gray-50);
  --swift-commerce-cookie-consent-muted: var(--swift-commerce-gray-200);
  --swift-commerce-cookie-consent-border: rgb(255 255 255 / 0.18);
}

.swift-commerce-cookie-consent--theme-dark .swift-commerce-cookie-consent__category,
.swift-commerce-cookie-consent--theme-dark .swift-commerce-cookie-consent__close {
  background-color: rgb(255 255 255 / 0.08);
}

/* Structured button variants. */
.swift-commerce-cookie-consent--buttons-sm .swift-commerce-cookie-consent__button {
  min-block-size: var(--swift-commerce-control-height-sm);
  padding-block: var(--swift-commerce-space-1-5);
  padding-inline: var(--swift-commerce-space-3);
  font-size: var(--swift-commerce-text-xs);
}

.swift-commerce-cookie-consent--buttons-lg .swift-commerce-cookie-consent__button {
  min-block-size: var(--swift-commerce-control-height-lg);
  padding-inline: var(--swift-commerce-space-5);
  font-size: var(--swift-commerce-text-base);
}

.swift-commerce-cookie-consent--buttons-pill .swift-commerce-cookie-consent__button {
  border-radius: var(--swift-commerce-radius-pill);
}

.swift-commerce-cookie-consent--buttons-square .swift-commerce-cookie-consent__button {
  border-radius: 0;
}

.swift-commerce-cookie-consent--buttons-rounded .swift-commerce-cookie-consent__button {
  border-radius: var(--swift-commerce-radius-lg);
}

.swift-commerce-cookie-consent--buttons-outlined .swift-commerce-cookie-consent__button--accept {
  color: var(--swift-commerce-cookie-consent-accept-background);
  background-color: transparent;
  border-color: var(--swift-commerce-cookie-consent-accept-background);
}

.swift-commerce-cookie-consent--decline-filled .swift-commerce-cookie-consent__button--decline {
  color: var(--swift-commerce-cookie-consent-background);
  background-color: var(--swift-commerce-cookie-consent-decline);
}

.swift-commerce-cookie-consent--decline-ghost .swift-commerce-cookie-consent__button--decline,
.swift-commerce-cookie-consent--decline-link .swift-commerce-cookie-consent__button--decline {
  background-color: transparent;
  border-color: transparent;
}

.swift-commerce-cookie-consent--decline-link .swift-commerce-cookie-consent__button--decline,
.swift-commerce-cookie-consent--settings-link .swift-commerce-cookie-consent__button--settings {
  text-decoration: underline;
}

.swift-commerce-cookie-consent--settings-outlined .swift-commerce-cookie-consent__button--settings {
  border-color: var(--swift-commerce-cookie-consent-primary);
  text-decoration: none;
}

.swift-commerce-cookie-consent--settings-ghost .swift-commerce-cookie-consent__button--settings {
  text-decoration: none;
}

/* Reopen controls. */
.swift-commerce-cookie-consent-reopen {
  position: fixed;
  z-index: var(--swift-commerce-z-popover);
}

.swift-commerce-cookie-consent-reopen--floating.swift-commerce-icon-button {
  inline-size: 3rem;
  block-size: 3rem;
  min-inline-size: 3rem;
  min-block-size: 3rem;
  padding: 0;
  color: var(--swift-commerce-color-on-primary);
  background-color: var(--swift-commerce-cookie-consent-primary, var(--swift-commerce-color-primary));
  border: 0;
  border-radius: var(--swift-commerce-radius-pill);
  box-shadow: var(--swift-commerce-shadow-md);
}

.swift-commerce-cookie-consent-reopen--floating:hover {
  color: var(--swift-commerce-color-on-primary);
  background-color: var(--swift-commerce-cookie-consent-primary-hover, var(--swift-commerce-color-primary-hover));
}

.swift-commerce-cookie-consent-reopen svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
}

.swift-commerce-cookie-consent-reopen--bottom-left {
  inset-inline-start: var(--swift-commerce-space-5);
  inset-block-end: var(--swift-commerce-space-5);
}

.swift-commerce-cookie-consent-reopen--bottom-right {
  inset-inline-end: var(--swift-commerce-space-5);
  inset-block-end: var(--swift-commerce-space-5);
}

.swift-commerce-cookie-consent-reopen--link {
  position: static;
  color: var(--swift-commerce-color-primary);
  background: transparent;
  border: 0;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

/* Motion is applied to the surface so positional transforms remain intact. */
.swift-commerce-cookie-consent.is-visible.swift-commerce-cookie-consent--animation-fade .swift-commerce-cookie-consent__surface {
  animation: swift-commerce-cookie-consent-fade var(--swift-commerce-cookie-consent-duration) var(--swift-commerce-ease-out);
}

.swift-commerce-cookie-consent.is-visible.swift-commerce-cookie-consent--animation-slide.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__surface {
  animation: swift-commerce-cookie-consent-slide-down var(--swift-commerce-cookie-consent-duration) var(--swift-commerce-ease-out);
}

.swift-commerce-cookie-consent.is-visible.swift-commerce-cookie-consent--animation-slide:not(.swift-commerce-cookie-consent--position-top) .swift-commerce-cookie-consent__surface {
  animation: swift-commerce-cookie-consent-slide-up var(--swift-commerce-cookie-consent-duration) var(--swift-commerce-ease-out);
}

@keyframes swift-commerce-cookie-consent-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes swift-commerce-cookie-consent-slide-up {
  from { opacity: 0; transform: translateY(1rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes swift-commerce-cookie-consent-slide-down {
  from { opacity: 0; transform: translateY(-1rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Dashboard preview uses the exact storefront component inside a bounded stage. */
.swift-commerce-cookie-consent--preview {
  position: absolute;
  inset: auto;
  inline-size: auto;
  max-inline-size: calc(100% - 2rem);
  transform: none;
  animation: none;
}

.swift-commerce-cookie-consent--preview .swift-commerce-cookie-consent__surface {
  max-block-size: 25rem;
}

.swift-commerce-cookie-consent--preview .swift-commerce-cookie-consent__preferences {
  max-block-size: 22rem;
  overflow-y: auto;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-bottom:not(.swift-commerce-cookie-consent--layout-boxed) {
  inset-inline: 0;
  inset-block-end: 0;
  inline-size: 100%;
  max-inline-size: none;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-top:not(.swift-commerce-cookie-consent--layout-boxed) {
  inset-inline: 0;
  inset-block-start: 0;
  inline-size: 100%;
  max-inline-size: none;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-bottom-left,
.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-bottom-right {
  inset-block-end: 1rem;
  inline-size: min(var(--swift-commerce-cookie-consent-max-width), calc(100% - 2rem));
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-bottom-left {
  inset-inline-start: 1rem;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-bottom-right {
  inset-inline-end: 1rem;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--position-center {
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: min(31.25rem, calc(100% - 2rem));
  transform: translate(-50%, -50%);
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom,
.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
  inset-inline-start: 50%;
  inline-size: min(var(--swift-commerce-cookie-consent-boxed-width), calc(100% - 2rem));
  max-inline-size: calc(100% - 2rem);
  transform: translateX(-50%);
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom {
  inset-block-end: 1rem;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
  inset-block-start: 1rem;
}

.swift-commerce-cookie-consent--preview.swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-center {
  inline-size: min(38.75rem, calc(100% - 2rem));
}

.swift-commerce-cookie-consent-preview-reopen {
  position: absolute;
}

/* Both storefront and preview respond to the component's real available width. */
@container swift-commerce-cookie-consent (max-width: 34rem) {
  .swift-commerce-cookie-consent__primary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--swift-commerce-space-3);
    padding: var(--swift-commerce-space-4);
  }

  .swift-commerce-cookie-consent__actions {
    align-items: stretch;
  }

  .swift-commerce-cookie-consent__actions .swift-commerce-cookie-consent__button {
    flex: 1 1 auto;
  }

  .swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__primary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__actions {
    padding: var(--swift-commerce-space-4) var(--swift-commerce-space-5);
    border-block-start: 1px solid var(--swift-commerce-cookie-consent-border);
    border-inline-start: 0;
  }
}

body.swift-commerce-cookie-consent-lock {
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .swift-commerce-cookie-consent--theme-auto {
    --swift-commerce-cookie-consent-background: var(--swift-commerce-gray-800);
    --swift-commerce-cookie-consent-text: var(--swift-commerce-gray-50);
    --swift-commerce-cookie-consent-muted: var(--swift-commerce-gray-200);
    --swift-commerce-cookie-consent-border: rgb(255 255 255 / 0.18);
  }
}

@media (max-width: 48rem) {
  .swift-commerce-cookie-consent--position-bottom-left,
  .swift-commerce-cookie-consent--position-bottom-right {
    inset-inline: var(--swift-commerce-space-3);
    inset-block-end: var(--swift-commerce-space-3);
    inline-size: auto;
    max-inline-size: none;
  }

  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom,
  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
    inset-inline: 0;
    inline-size: 100%;
    max-inline-size: none;
    transform: none;
  }

  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom {
    inset-block-end: 0;
  }

  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top {
    inset-block-start: 0;
  }

  .swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__surface,
  .swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__surface {
    border-radius: 0;
  }

  .swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
  .swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary,
  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
  .swift-commerce-cookie-consent--layout-boxed.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--swift-commerce-space-3);
    padding: var(--swift-commerce-space-4);
  }

  .swift-commerce-cookie-consent__actions {
    align-items: stretch;
  }

  .swift-commerce-cookie-consent__actions .swift-commerce-cookie-consent__button {
    flex: 1 1 auto;
  }

  .swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__primary,
  .swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-bottom .swift-commerce-cookie-consent__primary,
  .swift-commerce-cookie-consent--template-magazine.swift-commerce-cookie-consent--position-top .swift-commerce-cookie-consent__primary {
    display: grid;
    grid-template-columns: 1fr;
  }

  .swift-commerce-cookie-consent--template-magazine .swift-commerce-cookie-consent__actions {
    padding: var(--swift-commerce-space-4) var(--swift-commerce-space-5);
    border-block-start: 1px solid var(--swift-commerce-cookie-consent-border);
    border-inline-start: 0;
  }

  .swift-commerce-cookie-consent__categories {
    max-block-size: 14rem;
  }

  .swift-commerce-cookie-consent--preview .swift-commerce-cookie-consent__primary {
    padding: var(--swift-commerce-space-3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .swift-commerce-cookie-consent,
  .swift-commerce-cookie-consent *,
  .swift-commerce-cookie-consent-reopen {
    animation: none;
    scroll-behavior: auto;
    transition-duration: 0.01ms;
  }
}
