/* Brand tokens (scoped) */
.um-wrap,
#um-product-picker {
  --um-brand: #9c7b41;
  --um-brand-600: #8c6f3a;
  --um-brand-700: #7a5f31;
  --um-brand-50: #f6f1e6;
  --um-text: #222;
  --um-muted: #6b7280;
  --um-ring: rgba(156, 123, 65, 0.28);
}

/* Shortcode wrapper */
.um-wrap {
  color: var(--um-text);
}

.um-wrap h2,
.um-wrap h3 {
  color: var(--um-text);
  margin: 0 0 12px;
  letter-spacing: 0.2px;
}

.um-wrap h2 {
  font-size: 1.6rem;
  border-bottom: 2px solid var(--um-brand-50);
  padding-bottom: 8px;
}

.um-wrap h3 {
  font-size: 1.2rem;
  color: var(--um-brand-700);
}

/* Tabs */
.um-wrap .um-gender-tabs {
  display: flex;
  gap: 8px;
}

.um-wrap .um-gender-tab.button {
  background: #fff;
  color: var(--um-text);
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 8px 12px;
  transition: border-color .2s, background .2s, color .2s, box-shadow .2s;
}

.um-wrap .um-gender-tab.button:hover {
  border-color: var(--um-brand);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.um-wrap .um-gender-tab.button.active {
  background: var(--um-brand-50);
  color: var(--um-brand-700);
  border-color: var(--um-brand);
}

/* Form grid + fields */
.um-dynamic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px 16px;
}

.um-field label {
  display: block;
  font-weight: 600;
  color: var(--um-text);
}

.um-field small {
  color: var(--um-muted);
}

.um-field select,
.um-field input[type="text"],
.um-field input[type="number"],
.um-field textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.um-field select:focus,
.um-field input:focus,
.um-field textarea:focus {
  outline: none;
  border-color: var(--um-brand);
  box-shadow: 0 0 0 3px var(--um-ring);
}

/* Primary buttons inside shortcode */
.um-wrap .button.button-primary {
  background: var(--um-brand);
  border-color: var(--um-brand-600);
  color: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 0 2px 10px rgba(156,123,65,0.15);
  transition: background .2s, box-shadow .2s, transform .02s;
}

.um-wrap .button.button-primary:hover {
  background: var(--um-brand-600);
  box-shadow: 0 4px 16px rgba(156,123,65,0.18);
}

.um-wrap .button.button-primary:active {
  transform: translateY(1px);
}

/* “Add New Measurement” button */
.um-wrap #add-new-measurement.button {
  background: #fff;
  color: var(--um-brand-700);
  border: 1px solid var(--um-brand);
  border-radius: 8px;
  padding: 8px 12px;
}

.um-wrap #add-new-measurement.button:hover {
  background: var(--um-brand-50);
}

/* Notices */
.um-wrap .notice {
  border-radius: 8px;
  border-left: 4px solid var(--um-brand);
}

/* Saved sets list (shortcode) */
.um-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.um-list ul li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #eaeaea;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: border-color .2s, box-shadow .2s, transform .03s;
}

.um-list ul li:hover {
  border-color: var(--um-brand);
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  transform: translateY(-1px);
}

.um-list ul li strong {
  color: var(--um-text);
}

.um-list ul li a {
  color: var(--um-brand-700);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
  margin-left: 8px;
}

.um-list ul li a:hover {
  background: var(--um-brand-50);
  color: var(--um-brand);
}

/* Saved sets list: enhanced presentation */
.um-list ul { list-style: none; }

.um-set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #eaeaea;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  transition: border-color .2s, box-shadow .2s, transform .03s, background .2s;
  position: relative;
}

.um-set-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: var(--um-brand);
  opacity: .8;
}

.um-set-item:hover {
  border-color: var(--um-brand);
  box-shadow: 0 6px 18px rgba(0,0,0,0.07);
  transform: translateY(-1px);
  background: linear-gradient(0deg, rgba(156,123,65,0.03), rgba(156,123,65,0.03)), #fff;
}

.um-set-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.um-set-icon {
  color: var(--um-brand-700);
  background: var(--um-brand-50);
  border: 1px solid rgba(156,123,65,0.25);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 16px;
  flex: 0 0 34px;
}

.um-set-title {
  font-weight: 700;
  color: var(--um-text);
  text-transform: capitalize; /* capitalize saved titles */
  letter-spacing: .2px;
}

.um-set-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.um-set-actions a {
  color: var(--um-brand-700);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}

.um-set-actions a:hover {
  background: var(--um-brand-50);
  color: var(--um-brand);
}

.um-sep {
  color: #c9c9c9;
  user-select: none;
}

/* Product page: set picker container */
#um-product-picker {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 14px 14px 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

#um-product-picker h4 {
  margin: 0 0 10px;
  color: var(--um-brand-700);
}

/* Radio grid (product picker) */
.um-radio-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

/* Cards */
.um-radio-card {
  position: relative;
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #faf9f7;
  transition: border-color .2s, background .2s, box-shadow .2s, transform .03s;
  box-shadow: 0 1px 6px rgba(0,0,0,0.03);
}

.um-radio-card:hover {
  border-color: var(--um-brand);
  background: var(--um-brand-50);
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transform: translateY(-1px);
}

.um-radio-card input[type="radio"] {
  margin: 0 4px 0 0;
  accent-color: var(--um-brand);
}

/* Checked state (modern browsers) */
.um-radio-card:has(input[type="radio"]:checked) {
  border-color: var(--um-brand);
  background: #fff;
  box-shadow: 0 0 0 3px var(--um-ring), 0 6px 18px rgba(0,0,0,0.07);
}

/* Title inside card */
.um-set-title {
  font-weight: 600;
  color: var(--um-text);
}

/* Legacy grid (kept, but refreshed) */
.um-sets-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.um-set-card {
  border: 1px solid #e0e0e0;
  padding: 16px;
  width: 240px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow .2s, border-color .2s, transform .03s;
}

.um-set-card:hover {
  border-color: var(--um-brand);
  box-shadow: 0 4px 16px rgba(0,0,0,0.09);
  transform: translateY(-1px);
}

/* Modal (kept, color-tuned) */
.um-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
  animation: fadeIn .2s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.um-modal-inner {
  background: #fff;
  padding: 28px 22px;
  max-width: 520px;
  width: 100%;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  animation: modalPop .2s;
  border-top: 4px solid var(--um-brand);
}

@keyframes modalPop {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.um-close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 1.4rem;
  color: var(--um-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .2s;
  z-index: 1;
}

.um-close:hover,
.um-close:focus {
  color: var(--um-brand-700);
  outline: none;
}

li.um-set-item {
    list-style-type: none !important;
    text-transform: uppercase !important;
}
