/* Shared Bespoke Warm-Paper Custom Select Component (Landing + Desktop Settings) */

.native-select-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  pointer-events: none !important;
}

.select-with-dot .color-dot-preview.is-enhanced {
  display: none;
}

.cselect {
  position: relative;
  width: 100%;
  min-width: 0;
}

.cselect.cselect-compact {
  width: auto;
  min-width: 88px;
}

.cselect.cselect-sm.cselect-compact {
  min-width: 84px;
}

.cselect-trigger {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px 0 11px;
  border-radius: var(--radius-sm, 10px);
  border: 1px solid rgba(21, 20, 18, 0.13);
  background: #f7f1e6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 1px 2px rgba(21, 20, 18, 0.03);
  color: var(--ink, #141312);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.08s ease;
}

.cselect-compact .cselect-trigger {
  height: 30px;
  padding: 0 8px 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
}

/* Desktop 368px Settings Window Compact Scale */
.cselect-sm .cselect-trigger {
  height: 31px;
  padding: 0 8px 0 10px;
  border-radius: 9px;
  font-size: 12px;
  gap: 6px;
}

.cselect-sm.cselect-compact .cselect-trigger {
  height: 27px;
  padding: 0 7px 0 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
}

.cselect-trigger:hover {
  background: #ffffff;
  border-color: rgba(21, 20, 18, 0.28);
}

.cselect-trigger:active {
  transform: translateY(0.5px);
}

.cselect-trigger:focus-visible {
  outline: none;
  border-color: var(--ink, #141312);
  box-shadow: 0 0 0 2.5px rgba(21, 20, 18, 0.08);
}

.cselect-trigger[aria-expanded="true"] {
  background: #ffffff;
  border-color: var(--ink, #141312);
  box-shadow: 0 0 0 2.5px rgba(21, 20, 18, 0.08);
}

.cselect-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}

.cselect-sm .cselect-main {
  gap: 6px;
}

.cselect-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-chevron {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--ink-muted, #8a8278);
  transition: transform 0.18s var(--ease-key, cubic-bezier(0.22, 1, 0.36, 1)), color 0.15s ease;
}

.cselect-sm .cselect-chevron {
  width: 12px;
  height: 12px;
}

.cselect-trigger[aria-expanded="true"] .cselect-chevron {
  transform: rotate(180deg);
  color: var(--ink, #141312);
}

.cselect-swatch {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(21, 20, 18, 0.22);
}

.cselect-swatch.is-rainbow {
  background: conic-gradient(#f39c2b, #e89bb0, #6d8fb3, #6fa382, #f39c2b);
}

.cselect-palette {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.cselect-palette i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.8px rgba(21, 20, 18, 0.24);
}

/* Portaled Floating Menu (rendered on body so it never clips inside scroll containers) */
.cselect-menu {
  position: fixed;
  z-index: 90;
  padding: 5px;
  border-radius: 13px;
  border: 1px solid rgba(21, 20, 18, 0.13);
  background: var(--bg-popover, #fffdf9);
  box-shadow: 0 16px 36px rgba(21, 20, 18, 0.14), 0 2px 6px rgba(21, 20, 18, 0.06);
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  animation: cselectPop 0.15s var(--ease-key, cubic-bezier(0.22, 1, 0.36, 1));
}

.cselect-menu::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cselect-menu-sm {
  padding: 4px;
  border-radius: 11px;
  box-shadow: 0 12px 28px rgba(21, 20, 18, 0.15), 0 2px 6px rgba(21, 20, 18, 0.06);
}

@keyframes cselectPop {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cselect-menu.is-flipped {
  animation-name: cselectPopUp;
}

@keyframes cselectPopUp {
  from {
    opacity: 0;
    transform: translateY(4px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.cselect-option {
  width: 100%;
  min-height: 33px;
  padding: 5px 9px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-soft, #575049);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.1s ease, color 0.1s ease;
}

.cselect-menu-sm .cselect-option {
  min-height: 29px;
  padding: 4px 8px;
  border-radius: 7px;
  font-size: 12px;
}

.cselect-option:hover,
.cselect-option.is-active {
  background: var(--bg-surface, #f2eadc);
  color: var(--ink, #141312);
}

.cselect-option.is-selected {
  background: rgba(21, 20, 18, 0.065);
  color: var(--ink, #141312);
  font-weight: 700;
}

.cselect-option-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.cselect-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cselect-check {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  color: var(--ink, #141312);
  opacity: 0;
}

.cselect-option.is-selected .cselect-check {
  opacity: 1;
}
