/*
 * Appearance → Customize → ReviewX — controls pane styling.
 * The Customizer chrome is WordPress's; inside our panel the controls follow
 * the ReviewX admin look (tokens mirrored as plain values: the admin token
 * sheet is not loaded in customize.php).
 */
#accordion-panel-rvx_appearance .accordion-section-title,
#sub-accordion-panel-rvx_appearance .accordion-section-title {
  font-weight: 600;
}
#sub-accordion-panel-rvx_appearance .customize-panel-description {
  color: #4b5563;
  line-height: 1.5;
}

/* Section header: "Editing: Product" badge + reset link */
.customize-section-title .rvx-cz-editing {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: #0a56d1;
  letter-spacing: .01em;
}
.customize-section-title .rvx-cz-reset.button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 10px 12px 2px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #374151;
  font-size: 12px;
  font-weight: 500;
}
.customize-section-title .rvx-cz-reset.button:hover:not(:disabled) {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}
.customize-section-title .rvx-cz-reset.button:focus {
  outline: 2px solid #0a56d1;
  outline-offset: 1px;
  box-shadow: none;
}
.customize-section-title .rvx-cz-reset.button:disabled {
  border-color: #e5e7eb !important;
  background: #f9fafb !important;
  color: #9ca3af !important;
  cursor: default;
}
.customize-section-title .rvx-cz-reset .dashicons {
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
}
.rvx-cz-inherit-note {
  margin: 8px 12px 0 !important;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 12px;
}
.rvx-cz-section--locked .customize-control:not(.rvx-cz-keep) {
  opacity: .45;
  pointer-events: none;
}

/* Controls */
[id^="sub-accordion-section-rvx_appearance_"] .customize-control {
  /* Core sets width: 100%; the card padding must stay inside it. */
  box-sizing: border-box;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-title {
  margin-bottom: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control select,
[id^="sub-accordion-section-rvx_appearance_"] .customize-control input[type="text"] {
  box-sizing: border-box;
  max-width: 100%;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control select {
  width: 100%;
  min-height: 36px;
  border-radius: 8px;
  border-color: #d1d5db;
}
/*
 * Colour picker button. Core paints the chosen colour as the button's whole
 * background and hides the right part behind the label; clip the colour to the
 * padding box so it never bleeds under the border, and give the label an opaque
 * white background so only a neat swatch on the left shows the colour.
 */
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result.button {
  display: inline-flex;
  align-items: stretch;
  min-height: 36px;
  margin: 0;
  padding: 0 0 0 36px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-clip: padding-box;
  box-shadow: none;
  color: #374151;
  font-size: 12px;
  overflow: hidden;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result.button:hover,
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result.button:focus {
  border-color: #9ca3af;
  box-shadow: none;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result.button:focus {
  outline: 2px solid #0a56d1;
  outline-offset: 1px;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result-text {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0;
  background: #fff;
  line-height: 1;
  color: inherit;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-color-result.button:hover .wp-color-result-text {
  background: #f9fafb;
  color: #111827;
}
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-picker-input-wrap .button,
[id^="sub-accordion-section-rvx_appearance_"] .customize-control-color .wp-picker-container .wp-picker-input-wrap input[type="text"] {
  border-radius: 8px;
  min-height: 36px;
}

/* Range control */
.rvx-cz-range__row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rvx-cz-range__slider {
  flex: 1;
  margin: 0;
  accent-color: #0a56d1;
}
.rvx-cz-range__value {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.rvx-cz-range__number {
  width: 56px;
  min-height: 30px;
  border: 0 !important;
  box-shadow: none !important;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.rvx-cz-range__unit {
  padding: 0 8px;
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
}
.rvx-cz-clear {
  width: 26px;
  height: 26px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  cursor: pointer;
  line-height: 1;
}
.rvx-cz-clear:hover { color: #b91c1c; border-color: #fca5a5; }

/* Scope section */
#sub-accordion-section-rvx_appearance_scope .customize-control-select select {
  font-weight: 600;
}

/* Unset range = theme default: slider parked at the minimum, dimmed */
.rvx-cz-unset .rvx-cz-range__slider { opacity: .45; }
.rvx-cz-unset .rvx-cz-clear { visibility: hidden; }
