/* Colorway switcher — shared across every /designs/0X/ gallery page.
   Demo affordance only; it is never copied into a client's built site.
   Uses its own fixed colors (not the page palette) so it stays legible over
   any colorway and any section it floats above. */

/* Wrapper owns the fixed position so the "Change colorway" title can sit
   above the pill; the pill itself is static inside it. */
.cw-wrap {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 250;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.cw-title {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: rgba(245, 243, 240, 0.92);
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}
.cw-switch {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(18, 18, 20, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.cw-arrow,
.cw-label {
  appearance: none;
  border: 0;
  margin: 0;
  background: transparent;
  color: #f4f2ee;
  cursor: pointer;
  font: inherit;
}

.cw-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  border-radius: 999px;
  font-size: 17px;
  line-height: 1;
  transition: background 0.18s;
}
.cw-arrow:hover { background: rgba(255, 255, 255, 0.12); }
.cw-arrow:active { background: rgba(255, 255, 255, 0.2); }

.cw-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  min-width: 132px;
  justify-content: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 11px;
  transition: background 0.18s;
}
.cw-label:hover { background: rgba(255, 255, 255, 0.1); }

.cw-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
  flex: none;
}

.cw-caret {
  font-size: 8px;
  opacity: 0.7;
  transition: transform 0.2s;
}
.cw-switch.open .cw-caret { transform: rotate(180deg); }

/* ---- dropdown menu ---- */
.cw-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  min-width: 200px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(18, 18, 20, 0.86);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
}
.cw-switch.open .cw-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cw-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #f4f2ee;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.cw-item:hover { background: rgba(255, 255, 255, 0.1); }
.cw-item[aria-current="true"] { background: rgba(255, 255, 255, 0.14); }
.cw-item[aria-current="true"] .cw-check { opacity: 1; }
.cw-check { margin-left: auto; opacity: 0; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .cw-arrow, .cw-label, .cw-menu, .cw-caret, .cw-item { transition: none; }
}

/* On small screens keep it compact and clear of the site's menu button. */
@media (max-width: 767px) {
  .cw-wrap { top: 8px; gap: 4px; }
  .cw-title { font-size: 9px; padding: 2px 8px; }
  .cw-label { min-width: 104px; padding: 7px 10px; font-size: 10px; }
  .cw-arrow { width: 26px; font-size: 15px; }
}
