/* Shared by the visual guide and the web profile. Colour names are stored in buyer profiles. */
:root {
  --buybu-turquoise: #5de6d0;
  --buybu-blue: #81b4ff;
  --buybu-violet: #c4a2ff;
  --buybu-brand-ink: #f4f5f3;
  --buybu-brand-teal: var(--buybu-turquoise);
  --buybu-highlight: var(--buybu-turquoise);
}
:root[data-theme="light"] {
  --buybu-turquoise: #006958;
  --buybu-blue: #2057a7;
  --buybu-violet: #6638a6;
  --buybu-brand-ink: #1a2c24;
}
:root[data-accent="blue"] { --buybu-highlight: var(--buybu-blue); }
:root[data-accent="violet"] { --buybu-highlight: var(--buybu-violet); }

:root {
  --profile-panel: #151516;
  --profile-field: #1e1e20;
  --profile-text: #f2f1f2;
  --profile-line: #404044;
  --profile-accent: var(--buybu-highlight, #5de6d0);
}
:root[data-theme=light] {
  --profile-panel: #fff;
  --profile-field: #f0f4f2;
  --profile-text: #182924;
  --profile-line: #a8bbb2;
  --profile-accent: var(--buybu-highlight, #006958);
}
:root[data-theme][data-accent] {
  --accent: var(--profile-accent);
  --amber: var(--profile-accent);
  --mint: var(--profile-accent);
  --action: var(--profile-accent);
  --action-ink: #102a26;
  --accentBg: color-mix(in srgb, var(--profile-accent) 12%, var(--profile-panel));
  --borderHot: color-mix(in srgb, var(--profile-accent) 65%, var(--profile-panel));
}
:root[data-theme=light][data-accent] {--action-ink: #fff}
.buybu-wordmark {display: inline-flex; flex: none; align-items: center}
a.buybu-wordmark {min-height: 44px}
.buybu-wordmark img {display: block; width: 90px; height: auto}
.buybu-wordmark img.wordmark-light, :root[data-theme=light] .buybu-wordmark img {display: none}
:root[data-theme=light] .buybu-wordmark img.wordmark-light {display: block}
:root[data-accent] :is(.primary,.go) {background: var(--profile-accent); color: var(--action-ink)}
:root[data-accent] .primary:hover {background: var(--profile-accent); filter: brightness(1.06)}
:root[data-accent] :is(.item .tileicon,.switch-mode[aria-pressed=true],.tab[aria-pressed=true],.row.active) {
  color: var(--profile-accent); background: var(--accentBg);
}
:root[data-accent] :is(.tab[aria-pressed=true],.row.active) {border-color: var(--profile-accent)}
:root[data-accent] .row.active .radio {box-shadow: inset 0 0 0 2px var(--accentBg)}
:root[data-accent] .row.active .position {color: var(--action-ink)}
:root[data-accent] .tune-art {color: var(--profile-accent)}
button.profile-entry, .profile-settings .profile-close {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px;
  border: 1px solid var(--profile-line); border-radius: .7rem; background: transparent;
  color: var(--profile-text); cursor: pointer; padding: .4rem .8rem; font: 600 .9rem/1.25 system-ui,sans-serif;
}
.profile-entry svg {width: 18px; height: 18px; flex: none}
dialog.profile-settings {
  box-sizing: border-box; width: min(25rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow-y: auto;
  margin: auto; padding: clamp(1rem, 5vw, 1.6rem); border-radius: 1rem; border: 1px solid var(--profile-line);
  background: var(--profile-panel); color: var(--profile-text); font: 1rem/1.45 system-ui,sans-serif;
}
.profile-settings::backdrop {background: rgb(0 0 0 / .58)}
.profile-heading {display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0 0 1.25rem}
.profile-heading h2 {margin: 0; color: inherit; font: 650 1.45rem/1.18 system-ui,sans-serif; letter-spacing: -.035em}
.profile-settings .profile-close {width: 44px; padding: 0; flex: none}
.profile-field {display: grid; gap: .45rem; font-weight: 550}
.profile-field select {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: .6rem 2.2rem .6rem .8rem; font: inherit; font-weight: 400;
  appearance: none; border: 1px solid var(--profile-line); border-radius: .6rem; cursor: pointer;
  color: var(--profile-text); background-color: var(--profile-field);
  background-image: linear-gradient(45deg,transparent 50%,currentColor 50%),linear-gradient(135deg,currentColor 50%,transparent 50%);
  background-position: right 1.05rem center,right .75rem center; background-size: .3rem .3rem; background-repeat: no-repeat;
}
.profile-colors {border: 0; padding: 0; margin: 1.2rem 0 0; min-width: 0}
.profile-colors legend {font-weight: 550; padding: 0; margin: 0 0 .45rem}
.profile-colors label {
  display: inline-flex; flex-direction: row; align-items: center; gap: .45rem; min-height: 44px; box-sizing: border-box;
  padding: .45rem .8rem; margin: 0 .3rem .25rem 0; cursor: pointer;
  border: 1px solid var(--profile-line); border-radius: .6rem;
}
.profile-settings .profile-colors input {width: auto; min-height: 0; margin: 0; padding: 0; accent-color: var(--profile-accent)}
.profile-colors label:has(:checked) {border-color: var(--profile-accent); background: var(--profile-field)}
.profile-accents label {position: relative; flex-wrap: nowrap}
.profile-accents input {position: absolute; opacity: 0}
.profile-accents label:has(:focus-visible) {outline: 2px solid var(--profile-accent); outline-offset: 2px}
.profile-swatch {
  display: grid; place-items: center; flex: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--buybu-turquoise, var(--profile-accent)); color: var(--action-ink);
}
.profile-accents input[value=blue] + .profile-swatch {background: var(--buybu-blue)}
.profile-accents input[value=violet] + .profile-swatch {background: var(--buybu-violet)}
.profile-accents input:checked + .profile-swatch::after {
  content: ''; width: 8px; height: 4px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg);
}
@media (forced-colors:active) {
  .profile-swatch {border: 1px solid ButtonText; color: ButtonText}
  .profile-colors label:has(:checked) {border-color: Highlight}
}
button.profile-entry:focus-visible, .profile-settings :focus-visible {outline: 2px solid var(--profile-accent); outline-offset: 3px}
:where(button, a.action, .profile-colors label) {touch-action: manipulation}
@media (hover:hover) and (pointer:fine) {
  :where(button:not(:disabled), a.action, .profile-colors label):hover {filter: brightness(1.1)}
  button.profile-entry:hover, .profile-settings .profile-close:hover {background: var(--profile-field); border-color: var(--profile-accent)}
}
@media (prefers-reduced-motion:no-preference) {
  :where(button, a.action, .profile-colors label, .profile-field select) {
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, filter 120ms ease, translate 120ms ease;
  }
  :where(button:not(:disabled), a.action, .profile-colors label):active {translate: 0 1px}
}

.profile-settings .profile-status {font-size: .9rem; color: var(--profile-text); margin: .8rem 0 0}
.profile-settings .profile-account {margin: 1.25rem 0 0; padding: 1.1rem 0 0; border-top: 1px solid var(--profile-line)}
.profile-account h3 {margin: 0 0 .65rem; color: inherit; font: 600 1rem/1.3 system-ui,sans-serif; letter-spacing: normal}
.profile-account p {color: inherit; font-size: .9rem; margin: .4rem 0 .7rem}
.profile-account .account-email {font-weight: 600; overflow-wrap: anywhere}
.profile-account .account-actions {display: flex; flex-wrap: wrap; align-items: center; gap: .45rem}
.profile-account button {
  border-radius: .6rem; border: 1px solid var(--profile-line); background: var(--profile-field); color: var(--profile-text);
  min-height: 44px; padding: .45rem .75rem; cursor: pointer; font: 550 .9rem/1.3 system-ui,sans-serif;
}
.profile-account button[type=submit] {border-color: var(--profile-accent); color: var(--profile-accent)}
.profile-settings [hidden] {display: none!important}
.profile-account form label {display: block; margin: .65rem 0 .3rem}
.profile-account form input {
  display: block; box-sizing: border-box; width: 100%; min-height: 44px; margin-bottom: .6rem; padding: .55rem .65rem; font: inherit;
  border: 1px solid var(--profile-line); border-radius: .6rem; background: var(--profile-field); color: var(--profile-text)
}

.profile-account .code-lifetime {font-size: .85rem; font-variant-numeric: tabular-nums}
.profile-account input[name=code] {letter-spacing: .18em; font-variant-numeric: tabular-nums}
