/* From the design preview, preview/dark-themes.css (tools/theme-sync.mjs). */
/* Storefront appearance uses the visitor's choice and starts in light mode. */
:root {
  color-scheme: only light;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.theme-switch:hover {
  border-color: var(--accent);
}

.theme-switch:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.theme-switch-track {
  display: flex;
  align-items: center;
  flex: 0 0 36px;
  height: 21px;
  padding-inline: 3px;
  border: 1px solid var(--muted);
  border-radius: 999px;
  background: var(--paper);
}

.theme-switch-track::after {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--muted);
}

.theme-switch[aria-checked="true"] .theme-switch-track {
  justify-content: flex-end;
  border-color: var(--accent);
  background: var(--accent);
}

.theme-switch[aria-checked="true"] .theme-switch-track::after {
  background: var(--surface);
}

.account-appearance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.account .account-appearance h2 {
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.4;
}

.account-form + .account-appearance {
  max-width: 640px;
  margin-top: 28px;
}

/* Deep Cocoa */
html[data-dark-theme="cocoa"] {
  color-scheme: dark;
  --night-paper: #241c1b;
  --night-shelf: #2e2423;
  --night-card: #382d2b;
  --night-ink: #fbeee5;
  --night-muted: #d7bfb5;
  --night-rose: #e5afb7;
  --night-detail: #e8bf98;
}

html[data-dark-theme="cocoa"] body[data-direction] {
  --paper: var(--night-paper);
  --surface: var(--night-card);
  --ink: var(--night-ink);
  --muted: var(--night-muted);
  --accent: var(--night-rose);
  --soft: color-mix(in srgb, var(--night-card) 68%, var(--accent));
  --line: color-mix(in srgb, var(--night-card) 72%, var(--accent));
  --petal-line: color-mix(in srgb, var(--night-card) 50%, var(--accent));
  --paper-dot: color-mix(in srgb, var(--accent) 12%, transparent);
  --logo-color: var(--accent);
  --night-shadow: color-mix(in srgb, var(--paper) 65%, #000);
  --night-hover: color-mix(in srgb, var(--accent) 80%, var(--ink));
  background-color: var(--paper);
  color: var(--ink);

  > .header:not(.is-over-hero) {
    --hero-nav-ink: var(--ink);
    --logo-color: var(--accent);
    color: var(--ink);
    background-color: var(--paper);
    border-bottom-color: var(--line);
  }

  .static-home {
    --sf-paper: var(--paper);
    --sf-ink: var(--ink);
    --sf-rose: var(--accent);
    --sf-muted: var(--muted);
  }

  .sf-promises {
    background: var(--night-shelf);
    border-color: var(--line);
  }

  .sf-promises li,
  .lv-season-text,
  :is(.fw-category, .fw-description, .fw-hint) {
    color: var(--night-muted);
  }

  :is(.sf-promises lv-icon, .sf-promises svg, .lv-season-stamp) {
    color: var(--night-detail);
  }

  .home-favourites.story-home .h7-shop,
  main#main:has(.shop-section, .product) {
    --surface: var(--night-card);
    --muted: var(--night-muted);
    --accent: var(--night-rose);
    --lawn-line: var(--line);
    --lawn-shadow: var(--night-shadow);
    background: var(--night-shelf);
  }

  .home-favourites.story-home,
  .lv-season {
    box-shadow: none;
  }

  .home-favourites.story-home {
    background: radial-gradient(var(--paper-dot) .55px, transparent .7px) 0 0 / 7px 7px, var(--paper);
  }

  .home-favourites .h7-item {
    box-shadow: 4px 5px 0 var(--night-shadow);
  }

  .home-favourites .h7-head .eyebrow,
  .home-favourites .h7-quote .h7-stars,
  .fw-price {
    color: var(--night-detail);
  }

  .fw-note {
    background: var(--surface);
    border-color: var(--line);
  }

  .static-home .fw-note :is(h3, .fw-note-eyebrow) {
    color: var(--accent);
  }

  .fw-product {
    color: var(--ink);
  }

  .fw-arch {
    background-color: var(--surface);
    border-color: var(--line);
  }

  .review-stacks {
    --rs-bg: var(--night-shelf);
    --rs-ink: var(--ink);
    --rs-rose: var(--accent);
    --rs-muted: var(--muted);
    --rs-gold: var(--night-detail);
  }

  :is(.rs-dialog, .rs-close) {
    background: var(--surface);
  }

  .rs-score,
  .sf-last-note,
  .announce-bar {
    background: var(--surface);
    color: var(--ink);
  }

  .rs-score :is(.rs-score-head, .rs-score-of, .rs-score-total, .rs-score-link) {
    color: var(--ink);
  }

  .why-postcard {
    --w-paper: var(--surface);
  }

  .why-postcard .why-cameo-shape {
    background: radial-gradient(ellipse at 50% 38%, var(--surface), var(--night-shelf));
    box-shadow: inset 0 0 0 1px var(--line), inset 0 0 0 12px var(--night-shelf),
      inset 0 0 0 13px var(--line);
  }

  /* Selected controls set their text separately from rose links on cocoa paper. */
  :is(.chip.active, .rv-chip[aria-pressed="true"], .why-index-pill, .why-pill,
      .faq-topic.active, .account-nav a[aria-current="page"],
      .status-pill.is-done, .checkout-steps .is-done .step-mark,
      .email-widths a[aria-current="true"]) {
    color: var(--paper);
  }

  .faq-topic.active[data-link="ui"]:is(:hover, :focus-visible),
  .faq-topic.active::after {
    color: var(--paper);
  }

  :is(.rv-play, .product-review-play) {
    background: var(--surface);
  }

  .mini-bag-title svg {
    stroke: var(--paper);
  }

  .gift-message-status.is-invalid {
    color: var(--night-rose);
  }

  .skip {
    background: var(--surface);
    color: var(--ink);
  }

  /* The conservatory photograph keeps its original ink and light veil. */
  .button:not(.sf-shop-window *, .secondary, :disabled) {
    background-color: var(--night-rose);
    border-color: var(--night-rose);
    color: var(--paper);
  }

  .button:not(.sf-shop-window *, .secondary, :disabled):is(:hover, :focus-visible) {
    background-color: var(--night-hover);
    border-color: var(--night-hover);
    color: var(--paper);
  }

  footer.site-footer {
    --muted: var(--night-muted);
    --accent: var(--night-rose);
    background: linear-gradient(var(--paper), var(--night-shelf));
    border-top: 1px solid var(--line);
  }

  footer.site-footer .footer-social > * {
    background: var(--surface);
    border-color: var(--line);
  }

  footer.site-footer > .footer-meta {
    border-top-color: var(--line);
  }
}
