/* ==================== PREFERENCE POPUPS ==================== */

.pref-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pref-popup-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.pref-popup {
  background: var(--white);
  border-radius: 20px;
  padding: 32px 24px;
  max-width: 360px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.25s var(--ease-out);
}

.pref-popup-overlay.visible .pref-popup {
  transform: scale(1);
}

.pref-popup-style {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--cr-teal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.pref-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.pref-popup-copy {
  font-size: 0.9375rem;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: 24px;
}

/* Color swatches grid */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.color-swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.color-swatch {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.color-swatch-item:hover .color-swatch {
  transform: scale(1.05);
}

.color-swatch-item.selected .color-swatch {
  border: 3px solid var(--cr-teal);
  box-shadow: 0 0 0 2px rgba(70, 158, 146, 0.2);
}

.color-swatch-label {
  font-size: 0.75rem;
  color: var(--slate-600);
  text-align: center;
  max-width: 56px;
}

.color-expand-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 8px 0;
  margin-bottom: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: #DD693A;
  cursor: pointer;
  transition: color 0.15s ease;
  text-align: center;
}

.color-expand-link:hover {
  color: var(--cr-teal);
}

.color-expanded-section {
  display: none;
  margin-bottom: 16px;
}

.color-expanded-section.visible {
  display: block;
}

.color-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.color-divider::before,
.color-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--slate-200);
}

.color-divider-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Popup done button */
.pref-popup-btn {
  width: 100%;
  padding: 14px 24px;
  background: var(--cr-teal);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pref-popup-btn:hover {
  background: var(--cr-teal-dark);
}

.pref-popup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Firmness options (reuses preference-card styles) */
.firmness-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.firmness-options .preference-card {
  padding: 16px 20px;
}

/* Personal Care popup styles */
.pref-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  margin-top: 8px;
}

.gender-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.gender-pill {
  padding: 10px 18px;
  border: 2px solid #A3C6C0;
  border-radius: 20px;
  background: var(--white);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.15s ease;
}

.gender-pill:hover {
  border-color: var(--slate-300);
}

.gender-pill.selected {
  background: rgba(70, 158, 146, 0.08);
  border-color: var(--cr-teal);
  color: var(--cr-teal-dark, #3a857a);
}

/* ── Unscented Row ── */
.unscented-row {
  margin-top: 8px;
  height: 44px;
  border: 2px solid var(--slate-200);
  background: var(--white);
  border-radius: 12px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.unscented-row.selected {
  border-color: var(--cr-teal);
  background: var(--cr-teal-muted);
}

.unscented-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-700);
  transition: color 0.15s ease;
}

.unscented-row.selected .unscented-label {
  color: var(--cr-teal-dark);
}

.unscented-check {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--cr-teal);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.unscented-row.selected .unscented-check {
  opacity: 1;
}

/* ── Scent Grid ── */
.scent-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 20px;
  transition: opacity 0.2s ease;
}

.scent-grid.dimmed {
  opacity: 0.4;
  pointer-events: none;
}

.scent-pill {
  border: 2px solid var(--slate-200);
  background: var(--white);
  border-radius: 12px;
  padding: 14px 8px;
  cursor: pointer;
  text-align: center;
  position: relative;
  transition: border-color 0.15s ease, background 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.scent-pill.selected {
  border-color: var(--cr-teal);
  background: var(--cr-teal-muted);
}

.scent-pill:active:not(.selected) {
  background: var(--slate-50);
}

.scent-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cr-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.scent-pill.selected .scent-check {
  opacity: 1;
}

.scent-check svg {
  width: 8px;
  height: 8px;
}

.scent-emoji {
  font-size: 20px;
  line-height: 1;
}

.scent-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--slate-900);
  margin-top: 4px;
  line-height: 1.3;
}

.scent-sub {
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--slate-400);
  margin-top: 2px;
  line-height: 1.3;
}

.scent-pill.selected .scent-sub {
  color: var(--slate-500);
}
