.vareoncalc-toggle__option.is-active {
  background: var(--sc-accent);
  color: var(--sc-accent-text);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.vareoncalc-toggle:focus-visible {
  outline: 2px solid var(--sc-accent);
  outline-offset: 2px;
}

.vareoncalc-field .vareoncalc-error-msg {
  margin-top: 6px;
}

.vareoncalc-input-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.vareoncalc-input-row .vareoncalc-input:first-child {
  flex: 1;
}

.vareoncalc-input-row .vareoncalc-input {
  margin-bottom: 0;
}

.vareoncalc-input-row .vareoncalc-input+.vareoncalc-input {
  margin-left: 0;
}

.vareoncalc-input--condensed {
  max-width: 110px;
}

.vareoncalc-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 12px 0;
}

/* Preview Frame Styling */
.vareoncalc-preview-frame {
  background: var(--sc-card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Container - Remove any default borders */
.vareoncalc {
  border: none !important;
  outline: none !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container-type: inline-size;
  container-name: vareoncalc;
}

/* CSS Custom Properties */
.vareoncalc-root {
  border: none !important;
  outline: none !important;
  position: relative;
  width: 100%;
  min-width: 0;
  --sc-button-bg: var(--vareoncalc-button-bg, #3b82f6);
  --sc-button-text: var(--vareoncalc-button-text, #fff);
  --sc-button-hover: var(--vareoncalc-button-hover, #2563eb);
  --sc-card-bg: var(--vareoncalc-card-bg, #fff);
  --sc-card-border: var(--vareoncalc-card-border, #e5e7eb);
  --sc-card-text: var(--vareoncalc-card-text, #111827);
  --sc-border-width: var(--vareoncalc-border-width, 1px);
  --sc-border-style: var(--vareoncalc-border-style, solid);
  --sc-input-bg: var(--vareoncalc-input-bg, #f9fafb);
  --sc-select-bg: var(--vareoncalc-select-bg, var(--vareoncalc-input-bg, #f9fafb));
  --sc-input-text: var(--vareoncalc-input-text, var(--sc-card-text));
  --sc-input-border: var(--vareoncalc-input-border, #d1d5db);
  --sc-accent: var(--vareoncalc-accent, #3b82f6);
  --sc-accent-text: var(--vareoncalc-accent-text, var(--sc-button-text));
  --sc-info: var(--vareoncalc-info, var(--vareoncalc-info-border-left, #3b82f6));
  --sc-panel-info-bg: var(--vareoncalc-info-bg, #eff6ff);
  --sc-panel-info-border: var(--vareoncalc-info-border-left, #bfdbfe);
  --sc-panel-info-text: var(--vareoncalc-info-text, #1e3a8a);
  --sc-panel-info-soft-bg: var(--vareoncalc-panel-info-soft-bg, #e0f2fe);
  --sc-panel-success-bg: var(--vareoncalc-panel-success-bg, #ecfdf5);
  --sc-panel-success-border: var(--vareoncalc-panel-success-border, #bbf7d0);
  --sc-panel-success-text: var(--vareoncalc-panel-success-text, #065f46);
  --sc-panel-warning-bg: var(--vareoncalc-panel-warning-bg, #fef3c7);
  --sc-panel-warning-border: var(--vareoncalc-panel-warning-border, #fcd34d);
  --sc-panel-warning-text: var(--vareoncalc-panel-warning-text, #78350f);
  --sc-error: var(--vareoncalc-error-text, #dc2626);
  --sc-error-bg: var(--vareoncalc-error-bg, #fef2f2);
  --sc-error-border: var(--vareoncalc-error-border, #dc2626);
  --sc-panel-error-bg: var(--vareoncalc-panel-error-bg, var(--sc-error-bg));
  --sc-panel-error-border: var(--vareoncalc-panel-error-border, var(--sc-error-border));
  --sc-panel-error-text: var(--vareoncalc-panel-error-text, var(--sc-error));
  --sc-panel-accent-bg: var(--vareoncalc-panel-accent-bg, #dbeafe);
  --sc-panel-accent-border: var(--vareoncalc-panel-accent-border, #93c5fd);
  --sc-panel-accent-text: var(--vareoncalc-panel-accent-text, #1e3a8a);
  --sc-muted-text: var(--vareoncalc-muted-text, #6b7280);
  --sc-hero-accent: var(--vareoncalc-hero-accent, var(--sc-accent));
  /* Panel background/border - for sections within the calculator */
  --sc-panel-bg: var(--vareoncalc-panel-bg, var(--sc-input-bg, #f9fafb));
  --sc-panel-border: var(--vareoncalc-panel-border, var(--sc-card-border, #e5e7eb));
  /* Theme Studio token variables */
  --sc-focus-ring: var(--vareoncalc-focus-ring, var(--sc-accent));
  --sc-focus-shadow: var(--vareoncalc-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.3));
  --sc-label-text: var(--vareoncalc-label-text, var(--sc-card-text));
  --sc-link: var(--vareoncalc-link, var(--sc-accent));
  --sc-result-bg: var(--vareoncalc-result-bg, var(--sc-panel-info-bg));
  --sc-result-text: var(--vareoncalc-result-text, var(--sc-card-text));
  --sc-result-border: var(--vareoncalc-result-border, var(--sc-accent));
  --sc-tip-bg: var(--vareoncalc-tip-bg, var(--sc-panel-info-bg));
  --sc-tip-text: var(--vareoncalc-tip-text, var(--sc-panel-info-text));
  /* Numeric token variables with fallbacks */
  --sc-border-radius: var(--vareoncalc-border-radius, 12px);
  --sc-card-padding: var(--vareoncalc-card-padding, 16px);
  --sc-field-mb: var(--vareoncalc-field-mb, 16px);
  --sc-row-gap: var(--vareoncalc-row-gap, 12px);
  --sc-out-padding: var(--vareoncalc-out-padding, 16px);
  --sc-card-shadow: var(--vareoncalc-card-shadow, 0 4px 12px rgba(0, 0, 0, 0.08));
  --sc-card-shadow-hover: var(--vareoncalc-card-shadow-hover, 0 6px 16px rgba(0, 0, 0, 0.12));
  --sc-font-text-family: var(--vareoncalc-font-text-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  --sc-font-text-weight: var(--vareoncalc-font-text-weight, 400);
  --sc-font-text-size: var(--vareoncalc-font-text-size, 1rem);
  --sc-font-input-family: var(--vareoncalc-font-input-family, var(--sc-font-text-family));
  --sc-font-input-weight: var(--vareoncalc-font-input-weight, 400);
  --sc-font-input-size: var(--vareoncalc-font-input-size, 1rem);
  --sc-font-button-family: var(--vareoncalc-font-button-family, var(--sc-font-text-family));
  --sc-font-button-weight: var(--vareoncalc-font-button-weight, 600);
  --sc-font-button-size: var(--vareoncalc-font-button-size, 1rem);
  --sc-font-result-family: var(--vareoncalc-font-result-family, var(--sc-font-text-family));
  --sc-font-result-weight: var(--vareoncalc-font-result-weight, 600);
  --sc-font-result-size-main: var(--vareoncalc-font-result-size-main, 1.5rem);
  --sc-font-result-size-detail: var(--vareoncalc-font-result-size-detail, 1rem);
  --sc-font-hint-family: var(--vareoncalc-font-hint-family, var(--sc-font-text-family));
  --sc-font-hint-weight: var(--vareoncalc-font-hint-weight, 400);
  --sc-font-hint-size: var(--vareoncalc-font-hint-size, 0.95rem);
  --sc-font-line-height: var(--vareoncalc-font-line-height, 1.4);
  /* Full-viewport overlays (scenario modals): above WP block UI; below body tooltip portal */
  --vareoncalc-modal-z-index: 2000000;
}

.vareoncalc-root,
.vareoncalc-root .vareoncalc-card,
.vareoncalc-root .vareoncalc-card label,
.vareoncalc-root .vareoncalc-card p,
.vareoncalc-root .vareoncalc-card span:not(.vareoncalc-result-main):not(.vareoncalc-result-detail):not(.vareoncalc-result-tip) {
  font-family: var(--sc-font-text-family);
  font-weight: var(--sc-font-text-weight);
  font-size: var(--sc-font-text-size);
  line-height: var(--sc-font-line-height);
}

.vareoncalc-root input,
.vareoncalc-root select,
.vareoncalc-root textarea {
  font-family: var(--sc-font-input-family);
  font-weight: var(--sc-font-input-weight);
  font-size: var(--sc-font-input-size);
}

/* Keep native date/time picker icons visible on dark themes. */
.vareoncalc-root.theme-dark input[type="date"]::-webkit-calendar-picker-indicator,
.vareoncalc-root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
.vareoncalc-root.theme-dark input[type="time"]::-webkit-calendar-picker-indicator,
.vareoncalc-root[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator,
.vareoncalc-root.theme-dark input[type="month"]::-webkit-calendar-picker-indicator,
.vareoncalc-root[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
.vareoncalc-root.theme-dark input[type="week"]::-webkit-calendar-picker-indicator,
.vareoncalc-root[data-theme="dark"] input[type="week"]::-webkit-calendar-picker-indicator,
.vareoncalc-root.theme-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator,
.vareoncalc-root[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  filter: invert(1) brightness(1.25);
  opacity: 1;
}

.vareoncalc-root.theme-dark input[type="date"],
.vareoncalc-root[data-theme="dark"] input[type="date"],
.vareoncalc-root.theme-dark input[type="time"],
.vareoncalc-root[data-theme="dark"] input[type="time"],
.vareoncalc-root.theme-dark input[type="month"],
.vareoncalc-root[data-theme="dark"] input[type="month"],
.vareoncalc-root.theme-dark input[type="week"],
.vareoncalc-root[data-theme="dark"] input[type="week"],
.vareoncalc-root.theme-dark input[type="datetime-local"],
.vareoncalc-root[data-theme="dark"] input[type="datetime-local"] {
  color-scheme: dark;
}

.vareoncalc-root .vareoncalc-btn {
  font-family: var(--sc-font-button-family);
  font-weight: var(--sc-font-button-weight);
  font-size: var(--sc-font-button-size);
}

.vareoncalc-root .vareoncalc-result-main {
  font-family: var(--sc-font-result-family);
  font-weight: var(--sc-font-result-weight);
  font-size: var(--sc-font-result-size-main);
}

.vareoncalc-root .vareoncalc-result-detail,
.vareoncalc-root .vareoncalc-out strong {
  font-family: var(--sc-font-result-family);
  font-weight: var(--sc-font-result-weight);
  font-size: var(--sc-font-result-size-detail);
}

.vareoncalc-root .vareoncalc-result-tip,
.vareoncalc-root .vareoncalc-info,
.vareoncalc-root .vareoncalc-description,
.vareoncalc-root .description {
  font-family: var(--sc-font-hint-family);
  font-weight: var(--sc-font-hint-weight);
  font-size: var(--sc-font-hint-size);
}

/* Links */
.vareoncalc-root a:not(.vareoncalc-btn) {
  color: var(--sc-link);
  text-decoration: none;
  transition: color 0.2s ease;
}

.vareoncalc-root a:not(.vareoncalc-btn):hover {
  text-decoration: underline;
}

/* Shared Input Sections (universal themed container primitive)
   Border-only grouping — no fill, no shadow. */
.vareoncalc-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--sc-card-border, #e5e7eb);
  border-radius: 12px;
  background: transparent;
  box-shadow: none;
}

.vareoncalc-root.theme-dark .vareoncalc-section,
.vareoncalc-root[data-theme="dark"] .vareoncalc-section {
  background: transparent;
  border-color: var(--sc-card-border, #374151);
  box-shadow: none;
}

.vareoncalc-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.vareoncalc-section__title {
  font-size: 12px;
  font-weight: 700;
  color: var(--sc-muted-text, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* User-requested minimal chrome: hide section/meta heading elements across calculators. */
.vareoncalc-root .vareoncalc-section__title,
.vareoncalc-root .mortgage-card__badge,
.vareoncalc-root .mortgage-card__icon,
.vareoncalc-root .dti-section__icon,
.vareoncalc-root .inflation-anchor__label,
.vareoncalc-root .inflation-anchor__hint,
.vareoncalc-root .discount-section__icon,
.vareoncalc-root .rvb-step-intro {
  display: none !important;
}

.vareoncalc-section__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ====================================
  Universal Overflow Safety Defaults
  Centralized text safety for all calculators.
  ==================================== */

/* Shared human-facing labels/buttons: preserve readable word flow. */
.vareoncalc-root :where(
  .vareoncalc-panel__title,
  .vareoncalc-panel__subtitle,
  .vareoncalc-result-chip__label,
  .vareoncalc-metric__label,
  .vareoncalc-description,
  .description,
  .vareoncalc-card label,
  .vareoncalc-disclosure__title,
  .vareoncalc-disclosure__toggle,
  .vareoncalc-btn
) {
  min-width: 0;
  min-inline-size: 6ch;
  overflow-wrap: normal;
  word-break: normal;
}

/* Technical token surfaces: allow aggressive wrapping for long unbroken strings. */
.vareoncalc-root :where(
  code,
  pre,
  kbd,
  samp,
  .vareoncalc-technical-token,
  .vareoncalc-raw-id,
  [data-vareoncalc-token]
) {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Flex/grid children must be shrinkable to prevent overflow rails. */
.vareoncalc-root :where(
  .vareoncalc-section__header > *,
  .vareoncalc-disclosure__header > *,
  .vareoncalc-target-group__controls > *,
  .vareoncalc-toggle__track > *
) {
  min-width: 0;
}

/* Keep compact controls single-line with ellipsis where needed. */
.vareoncalc-root :where(
  .vareoncalc-toggle__option,
  .vareoncalc-term-unit,
  .vareoncalc-disclosure__toggle
) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prefer truncation on disclosure label text, not icon glyphs. */
.vareoncalc-root .vareoncalc-disclosure__toggle > span:not(.vareoncalc-disclosure__icon) {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Editor preview/picker text safety (base.css is used in editor too). */
.vareoncalc-editor-preview-meta,
.vareoncalc-editor-picker-card-title {
  min-width: 0;
}

.vareoncalc-editor-picker-card-title {
  min-inline-size: 6ch;
  overflow-wrap: normal;
  word-break: normal;
}

.vareoncalc-editor-preview-meta {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.vareoncalc-editor-preview-meta,
.vareoncalc-editor-picker-card-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Panel Utilities */
.vareoncalc-panel {
  background: var(--sc-panel-bg);
  border: 1px solid var(--sc-panel-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--sc-panel-shadow);
  color: var(--sc-card-text);
}

.vareoncalc-panel+.vareoncalc-panel {
  margin-top: 16px;
}

.vareoncalc-panel--padded-lg {
  padding: 20px;
}

.vareoncalc-panel--header {
  text-align: center;
  padding: 20px;
}

.vareoncalc-panel--info {
  background: var(--sc-panel-info-bg);
  border-color: var(--sc-panel-info-border);
  color: var(--sc-panel-info-text);
}

.vareoncalc-panel--info-soft {
  background: var(--sc-panel-info-soft-bg);
  border-color: transparent;
  color: var(--sc-panel-info-text);
}

.vareoncalc-panel--success {
  background: var(--sc-panel-success-bg);
  border-color: var(--sc-panel-success-border);
  color: var(--sc-panel-success-text);
}

.vareoncalc-panel--warning {
  background: var(--sc-panel-warning-bg);
  border-color: var(--sc-panel-warning-border);
  color: var(--sc-panel-warning-text);
}

.vareoncalc-panel--error {
  background: var(--sc-panel-error-bg);
  border-color: var(--sc-panel-error-border);
  color: var(--sc-panel-error-text);
}

.vareoncalc-panel--accent {
  background: var(--sc-panel-accent-bg);
  border-color: var(--sc-panel-accent-border);
  color: var(--sc-panel-accent-text);
}

.vareoncalc-panel__title {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 700;
}

.vareoncalc-panel__subtitle {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: var(--sc-muted-text);
}

.vareoncalc-body-text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--sc-card-text);
}

.vareoncalc-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--sc-card-text);
}

.vareoncalc-list li+li {
  margin-top: 6px;
}

.vareoncalc-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.vareoncalc-result-chip {
  padding: 12px;
  border-radius: 8px;
  background: var(--sc-card-bg);
  border: 1px solid var(--sc-card-border);
  text-align: center;
  color: var(--sc-card-text);
}

.vareoncalc-result-chip__label {
  font-size: 12px;
  color: var(--sc-muted-text);
}

.vareoncalc-result-chip__value {
  font-size: 20px;
  font-weight: 700;
  color: var(--sc-hero-accent);
}

.vareoncalc-chip-lg .vareoncalc-result-chip__value {
  font-size: 32px;
}

.vareoncalc-chip-sm .vareoncalc-result-chip__value {
  font-size: 14px;
}

.vareoncalc-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.vareoncalc-metric {
  padding: 12px;
  border-radius: 8px;
  background: var(--sc-panel-bg);
  border: 1px solid var(--sc-panel-border);
  color: var(--sc-card-text);
}

.vareoncalc-metric__label {
  font-size: 12px;
  color: var(--sc-muted-text);
  margin-bottom: 4px;
}

.vareoncalc-metric__value {
  font-size: 16px;
  font-weight: 600;
}

/* Card Container */
.vareoncalc-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: var(--sc-card-padding);
  border-radius: var(--sc-border-radius);
  border: var(--vareoncalc-border-width, 1px) var(--vareoncalc-border-style, solid) var(--vareoncalc-card-border, transparent);
  background: var(--sc-card-bg);
  color: var(--sc-card-text);
  max-width: 100%;
  box-shadow: var(--sc-card-shadow);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.vareoncalc-card:hover {
  box-shadow: var(--sc-card-shadow-hover);
}

/* Fields */
.vareoncalc-card label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--sc-label-text);
  opacity: 0.88;
}

/* Utility class applied by JS to keep long input labels on one line. */
.vareoncalc-root label.vareoncalc-label--truncate {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vareoncalc-card select,
.vareoncalc-card textarea,
.vareoncalc-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) {
  width: 100%;
  height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--sc-input-border);
  border-radius: 8px;
  background: var(--sc-input-bg);
  color: var(--sc-input-text);
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  box-sizing: border-box;
  margin-bottom: var(--sc-field-mb);
  font-family: inherit;
}

.vareoncalc-card textarea {
  height: auto;
  min-height: 48px;
}

.vareoncalc-card select,
.vareoncalc-input[type="select-one"],
.vareoncalc-input[type="select-multiple"],
.vareoncalc-input.select {
  background: var(--sc-select-bg);
}

.vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.vareoncalc-card select:focus,
.vareoncalc-card textarea:focus,
.vareoncalc-input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus {
  outline: none;
  border-color: var(--sc-accent);
  box-shadow: var(--sc-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.15));
}

.vareoncalc-card select:focus,
.vareoncalc-input[type="select-one"]:focus,
.vareoncalc-input[type="select-multiple"]:focus,
.vareoncalc-input.select:focus {
  background: var(--sc-select-bg);
}

.vareoncalc-card select,
.vareoncalc-input[type="select-one"],
.vareoncalc-input[type="select-multiple"],
.vareoncalc-input.select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 40px;
}

/* Modern Checkbox Container */
#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"],
.vareoncalc-card input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  margin: 0;
  padding: 0 !important;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border: 2px solid var(--sc-input-border) !important;
  border-radius: 6px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 2px rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
}

#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:hover,
.vareoncalc-card input[type="checkbox"]:hover {
  border-color: var(--sc-accent) !important;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%) !important;
  box-shadow:
    0 2px 8px rgba(59, 130, 246, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-1px);
}

#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:focus,
.vareoncalc-card input[type="checkbox"]:focus {
  outline: none;
  border-color: var(--sc-accent) !important;
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.12),
    0 2px 8px rgba(59, 130, 246, 0.15),
    inset 0 1px 2px rgba(255, 255, 255, 1) !important;
}

#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:checked,
.vareoncalc-card input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--sc-accent) 0%, #1d4ed8 100%) !important;
  border-color: var(--sc-accent) !important;
  box-shadow:
    0 3px 12px rgba(59, 130, 246, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
}

#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:checked:hover,
.vareoncalc-card input[type="checkbox"]:checked:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%) !important;
  box-shadow:
    0 4px 16px rgba(59, 130, 246, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.3),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1) !important;
}

/* Animated Checkmark */
#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:checked::after,
.vareoncalc-card input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(1);
  opacity: 1;
  transition: all 0.2s ease-in-out 0.1s;
}

/* Pulse Animation */
#vareoncalc-preview-root .vareoncalc-card input[type="checkbox"]:checked::before,
.vareoncalc-card input[type="checkbox"]:checked::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: checkboxPulse 0.4s ease-out;
}

@keyframes checkboxPulse {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
  }

  50% {
    width: 24px;
    height: 24px;
    opacity: 0.3;
  }

  100% {
    width: 0;
    height: 0;
    opacity: 0;
  }
}

/* Error States */
.vareoncalc-card input:not([type="checkbox"]).vareoncalc-error,
.vareoncalc-card select.vareoncalc-error,
.vareoncalc-card textarea.vareoncalc-error {
  border-color: var(--sc-error-border, #dc2626);
  background-color: var(--sc-error-bg, #fef2f2);
  box-shadow: 0 0 0 3px var(--sc-error-bg, #fef2f2), inset 0 0 0 1px var(--sc-error-border, #dc2626);
  animation: vareoncalcErrorPulse 0.4s ease;
}

@keyframes vareoncalcErrorPulse {

  0%,
  100% {
    box-shadow: 0 0 0 3px var(--sc-error-bg, #fef2f2), inset 0 0 0 1px var(--sc-error-border, #dc2626);
  }

  50% {
    box-shadow: 0 0 0 5px var(--sc-error-bg, #fef2f2), inset 0 0 0 1px var(--sc-error-border, #dc2626);
  }
}

.vareoncalc-root.theme-dark .vareoncalc-card input:not([type="checkbox"]).vareoncalc-error,
.vareoncalc-root[data-theme="dark"] .vareoncalc-card input:not([type="checkbox"]).vareoncalc-error,
.vareoncalc-root.theme-dark .vareoncalc-card select.vareoncalc-error,
.vareoncalc-root[data-theme="dark"] .vareoncalc-card select.vareoncalc-error,
.vareoncalc-root.theme-dark .vareoncalc-card textarea.vareoncalc-error,
.vareoncalc-root[data-theme="dark"] .vareoncalc-card textarea.vareoncalc-error {
  border-color: #ef4444;
  background-color: rgba(185, 28, 28, 0.25);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4), inset 0 0 0 1px rgba(239, 68, 68, 0.3);
}

.vareoncalc-error-msg {
  display: block;
  color: var(--sc-error);
  font-size: 13px;
  font-weight: 500;
  margin-top: 4px;
  margin-bottom: 12px;
  margin-left: 2px;
}

/* Result container error styling */
.vareoncalc-result-error {
  padding: 12px 16px;
  background: var(--sc-error-bg, #fef2f2);
  border: 1px solid var(--sc-error-border, #fecaca);
  border-radius: 8px;
  color: var(--sc-error, #dc2626);
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  text-align: center;
}

.vareoncalc-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sc-toast-bg, var(--sc-panel-error-bg, var(--sc-error-bg, #fef2f2)));
  color: var(--sc-toast-text, var(--sc-panel-error-text, var(--sc-error, #dc2626)));
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--sc-toast-border, var(--sc-panel-error-border, var(--sc-error-border, #dc2626)));
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  box-shadow: var(--sc-toast-shadow, var(--sc-card-shadow));
}

.vareoncalc-toast::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--sc-toast-icon-bg, var(--sc-error-border, #dc2626));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: var(--sc-toast-icon, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E"));
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px;
}

.vareoncalc-toast--error {
  --sc-toast-bg: var(--sc-panel-error-bg, var(--sc-error-bg, #fef2f2));
  --sc-toast-text: var(--sc-panel-error-text, var(--sc-error, #dc2626));
  --sc-toast-border: var(--sc-panel-error-border, var(--sc-error-border, #dc2626));
  --sc-toast-icon-bg: var(--sc-error-border, #dc2626);
  --sc-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='8' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'%3E%3C/line%3E%3C/svg%3E");
}

.vareoncalc-toast--success {
  --sc-toast-bg: var(--sc-success-bg-subtle, #ecfdf5);
  --sc-toast-text: var(--sc-success, #16a34a);
  --sc-toast-border: var(--sc-success-border, #86efac);
  --sc-toast-icon-bg: var(--sc-success, #16a34a);
  --sc-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

.vareoncalc-toast--info {
  --sc-toast-bg: var(--sc-info-bg-subtle, #eff6ff);
  --sc-toast-text: var(--sc-info-text, #1e3a8a);
  --sc-toast-border: var(--sc-info-border, #93c5fd);
  --sc-toast-icon-bg: var(--sc-info-border, #3b82f6);
  --sc-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='10' x2='12' y2='16'/%3E%3Ccircle cx='12' cy='7' r='1' fill='white' stroke='white'/%3E%3C/svg%3E");
}

.vareoncalc-toast--warning {
  --sc-toast-bg: #fff7ed;
  --sc-toast-text: #9a3412;
  --sc-toast-border: #fdba74;
  --sc-toast-icon-bg: #ea580c;
  --sc-toast-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='12' y1='8' x2='12' y2='13'/%3E%3Ccircle cx='12' cy='17' r='1' fill='white' stroke='white'/%3E%3C/svg%3E");
}

.vareoncalc-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.vareoncalc-root.theme-dark .vareoncalc-toast--error,
.vareoncalc-root[data-theme="dark"] .vareoncalc-toast--error {
  --sc-toast-bg: linear-gradient(135deg, #1f2937 0%, #292524 100%);
  --sc-toast-border: #7f1d1d;
  --sc-toast-text: #fecaca;
  --sc-toast-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(239, 68, 68, 0.3);
  --sc-toast-icon-bg: #ef4444;
}

.vareoncalc-root.theme-dark .vareoncalc-toast--success,
.vareoncalc-root[data-theme="dark"] .vareoncalc-toast--success {
  --sc-toast-bg: rgba(6, 78, 59, 0.9);
  --sc-toast-border: #14532d;
  --sc-toast-text: #bbf7d0;
  --sc-toast-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(34, 197, 94, 0.3);
  --sc-toast-icon-bg: #22c55e;
}

.vareoncalc-root.theme-dark .vareoncalc-toast--info,
.vareoncalc-root[data-theme="dark"] .vareoncalc-toast--info {
  --sc-toast-bg: rgba(30, 58, 138, 0.85);
  --sc-toast-border: #1d4ed8;
  --sc-toast-text: #bfdbfe;
  --sc-toast-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(59, 130, 246, 0.3);
  --sc-toast-icon-bg: #3b82f6;
}

.vareoncalc-root.theme-dark .vareoncalc-toast--warning,
.vareoncalc-root[data-theme="dark"] .vareoncalc-toast--warning {
  --sc-toast-bg: rgba(124, 45, 18, 0.88);
  --sc-toast-border: #c2410c;
  --sc-toast-text: #fed7aa;
  --sc-toast-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(249, 115, 22, 0.3);
  --sc-toast-icon-bg: #f97316;
}

.vareoncalc-root.theme-dark .vareoncalc-result-error,
.vareoncalc-root[data-theme="dark"] .vareoncalc-result-error {
  background: var(--sc-error-bg, #450a0a);
  border-color: var(--sc-error-border, #f87171);
  color: var(--sc-error, #f87171);
}

.vareoncalc-field__error {
  color: var(--sc-error) !important;
  font-size: 13px;
  font-weight: 600;
  margin-top: 4px;
}

/* Button */
.vareoncalc-btn {
  display: block;
  width: 100%;
  padding: 14px 20px;
  border-radius: 12px;
  border: none;
  background: var(--sc-button-bg);
  color: var(--sc-button-text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 600;
  font-size: 16px;
  margin-top: 8px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.vareoncalc-btn:hover:not(:disabled) {
  background: var(--sc-button-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.vareoncalc-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.vareoncalc-btn:disabled,
.vareoncalc-btn.vareoncalc-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.vareoncalc-btn.vareoncalc-btn--loading {
  position: relative;
  color: transparent;
}

.vareoncalc-btn.vareoncalc-btn--loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: vareoncalc-spin 0.6s linear infinite;
  color: var(--sc-button-text);
}

.vareoncalc-btn.vareoncalc-btn--ghost {
  width: auto;
  min-width: 0;
  padding: 10px 16px;
  background: transparent;
  color: var(--sc-card-text);
  border: 1px solid var(--sc-input-border);
  box-shadow: none;
}

.vareoncalc-btn.vareoncalc-btn--ghost:hover:not(:disabled) {
  background: var(--sc-input-bg);
  color: var(--sc-accent);
  border-color: var(--sc-accent);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.vareoncalc-btn.vareoncalc-btn--ghost:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.vareoncalc-btn.vareoncalc-btn--icon {
  width: auto;
  min-width: 0;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 8px;
}

.vareoncalc-btn.vareoncalc-btn--icon svg {
  width: 14px;
  height: 14px;
}

.vareoncalc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--sc-input-bg);
  border: 1px solid var(--sc-input-border);
  color: var(--sc-card-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
}

.vareoncalc-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vareoncalc-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.vareoncalc-target-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.vareoncalc-target-group__label {
  font-size: 14px;
  font-weight: 500;
  color: var(--sc-card-text);
  min-width: 60px;
}

.vareoncalc-target-group__controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vareoncalc-toggle {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  background: var(--sc-input-bg);
  border: 1px solid var(--sc-input-border);
  border-radius: 10px;
  padding: 3px;
  min-width: 130px;
  max-width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vareoncalc-toggle:focus-within,
.vareoncalc-toggle:hover {
  border-color: var(--sc-accent);
  box-shadow: 0 1px 4px rgba(59, 130, 246, 0.16);
}

.vareoncalc-toggle__track {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  gap: 3px;
  min-width: 0;
}

.vareoncalc-toggle__indicator {
  display: none;
}

.vareoncalc-toggle[data-mode="markup"] .vareoncalc-toggle__indicator {
  transform: translateX(100%);
}

.vareoncalc-toggle__option {
  flex: 1;
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sc-muted-text, #6b7280);
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.vareoncalc-toggle__option:focus-visible {
  outline: 2px solid var(--sc-accent);
  outline-offset: 2px;
}

.vareoncalc-toggle[data-mode="margin"] .vareoncalc-toggle__option--margin,
.vareoncalc-toggle[data-mode="markup"] .vareoncalc-toggle__option--markup {
  color: var(--sc-accent-text);
}

/* Inline term unit toggle (Yr/Mo) used by multiple calculators. */
.vareoncalc-term-units {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.vareoncalc-term-unit {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: inherit;
  font-family: inherit;
  font-weight: 500;
  line-height: 1;
  color: var(--sc-muted-text, #6b7280);
  cursor: pointer;
  transition: color 0.15s ease;
}

.vareoncalc-term-unit:hover,
.vareoncalc-term-unit:focus-visible {
  color: var(--sc-card-text, #111827);
}

.vareoncalc-term-unit:focus-visible {
  outline: 2px solid var(--sc-accent, #2563eb);
  outline-offset: 2px;
  border-radius: 4px;
}

.vareoncalc-term-unit.is-active,
.vareoncalc-term-unit[aria-pressed="true"] {
  color: var(--sc-card-text, #111827);
  font-weight: 700;
}

.vareoncalc-term-unit-divider {
  color: var(--sc-muted-text, #6b7280);
}

/* Shared measurement toggle (Metric/Imperial). */
.vareoncalc-measurement-toggle-wrapper {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-bottom: 12px;
}

.vareoncalc-measurement-toggle {
  width: fit-content;
  min-width: 108px;
  max-width: 100%;
  border: 1px solid var(--sc-input-border, #d1d5db);
  border-radius: 10px;
  padding: 1px;
  background: color-mix(in srgb, var(--sc-input-bg, #f3f4f6) 82%, transparent);
  box-shadow: none;
}

.vareoncalc-measurement-toggle:hover,
.vareoncalc-measurement-toggle:focus-within {
  border-color: var(--sc-input-border, #d1d5db);
  box-shadow: none;
}

.vareoncalc-measurement-toggle .vareoncalc-toggle__track {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 1px;
}

.vareoncalc-measurement-toggle__btn {
  flex: 0 0 auto;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sc-muted-text, #6b7280);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  font-size: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.vareoncalc-measurement-toggle__btn:hover:not(.is-active):not([aria-pressed="true"]) {
  background: rgba(59, 130, 246, 0.08);
}

.vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-measurement-toggle__btn--active {
  background: var(--sc-card-bg, #ffffff);
  color: var(--sc-card-text, #111827);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

/* Legacy measurement toggle markup fallback (no .vareoncalc-toggle class). */
.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 1px;
  width: fit-content;
  min-width: 108px;
  max-width: 100%;
  background: color-mix(in srgb, var(--sc-input-bg, #f3f4f6) 82%, transparent);
  border: 1px solid var(--sc-input-border, #d1d5db);
  border-radius: 10px;
  padding: 1px;
}

.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn {
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--sc-muted-text, #6b7280);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  min-height: 22px;
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn:hover:not(.is-active):not([aria-pressed="true"]) {
  background: rgba(59, 130, 246, 0.08);
}

.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn--active {
  background: var(--sc-card-bg, #ffffff);
  color: var(--sc-card-text, #111827);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.16);
}

.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle,
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle {
  background: color-mix(in srgb, var(--sc-card-bg, #111827) 68%, var(--sc-input-bg, #0f172a) 32%);
  border-color: var(--sc-card-border, #374151);
}

.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle:not(.vareoncalc-toggle),
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) {
  background: color-mix(in srgb, var(--sc-card-bg, #111827) 68%, var(--sc-input-bg, #0f172a) 32%);
  border-color: var(--sc-card-border, #374151);
}

.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle__btn--active,
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle__btn--active,
.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-root.theme-dark .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn--active,
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn.is-active,
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn[aria-pressed="true"],
.vareoncalc-root[data-theme="dark"] .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) .vareoncalc-measurement-toggle__btn--active {
  background: color-mix(in srgb, var(--sc-card-border, #374151) 86%, var(--sc-card-bg, #111827) 14%);
  color: var(--sc-card-text, #f9fafb);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

/* Shared section divider for Metric/Imperial header rows. */
.vareoncalc-section__header:has(.vareoncalc-measurement-toggle__btn[data-mode="metric"]):has(.vareoncalc-measurement-toggle__btn[data-mode="imperial"]) {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--sc-card-border, #e5e7eb);
}

.vareoncalc-root.theme-dark .vareoncalc-section__header:has(.vareoncalc-measurement-toggle__btn[data-mode="metric"]):has(.vareoncalc-measurement-toggle__btn[data-mode="imperial"]),
.vareoncalc-root[data-theme="dark"] .vareoncalc-section__header:has(.vareoncalc-measurement-toggle__btn[data-mode="metric"]):has(.vareoncalc-measurement-toggle__btn[data-mode="imperial"]) {
  border-bottom-color: var(--sc-card-border, #374151);
}

.vareoncalc-target-input__field {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--sc-input-border);
  border-radius: 6px;
  background: var(--sc-input-bg);
  color: var(--sc-card-text);
  font-size: 14px;
  text-align: center;
}

.vareoncalc-target-input__field:focus {
  border-color: var(--sc-accent);
  background: var(--sc-card-bg);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  outline: none;
}

.converter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.converter-tab {
  border: 1px solid var(--sc-input-border);
  border-radius: 10px;
  background: var(--sc-card-bg);
  color: var(--sc-card-text);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.converter-tab:hover {
  border-color: var(--sc-accent);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.18);
}

.converter-tab.is-active {
  background: var(--sc-accent);
  border-color: var(--sc-accent);
  color: var(--sc-button-text);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.22);
}

@keyframes vareoncalc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Output / Results */
.vareoncalc-out {
  margin-top: var(--sc-field-mb);
  padding: var(--sc-out-padding);
  background: var(--sc-result-bg);
  border-radius: calc(var(--sc-border-radius) - 4px);
  border: 1px solid var(--sc-result-border);
}

.vareoncalc-result-main {
  font-size: 28px;
  font-weight: 700;
  color: var(--sc-result-text);
  margin-bottom: 12px;
  line-height: 1.2;
}

.vareoncalc-result-detail {
  font-size: 15px;
  font-weight: 500;
  color: var(--sc-result-text);
  opacity: 0.85;
  margin: 8px 0;
  line-height: 1.5;
}

.vareoncalc-result-tip {
  font-size: 14px;
  font-weight: 400;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 16px;
  background: var(--sc-tip-bg);
  color: var(--sc-tip-text);
  border: 1px solid var(--sc-panel-info-border);
  line-height: 1.6;
}

/* Branding */
.vareoncalc-brand {
  font-size: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--sc-card-border);
  color: var(--sc-muted-text);
  opacity: 0.8;
  position: relative;
}

.vareoncalc-brand-grid {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

@media (max-width: 640px) {
  .vareoncalc-brand-grid {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .vareoncalc-brand-logo {
    justify-content: center;
    margin-left: 0;
  }

  .vareoncalc-brand-logo a {
    justify-content: center;
  }
}

.vareoncalc-brand-description {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: inherit;
}

.vareoncalc-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
}

/* Center logo when "Powered by" text is hidden */
.vareoncalc-brand-description[style*="display: none"]~.vareoncalc-brand-logo,
.vareoncalc-brand-grid:not(:has(.vareoncalc-brand-description:not([style*="display: none"]))) .vareoncalc-brand-logo {
  justify-content: center !important;
  margin-left: 0 !important;
  width: 100% !important;
}

.vareoncalc-brand a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  min-height: 28px;
  box-sizing: border-box;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.vareoncalc-brand a:hover {
  opacity: 1;
  background: var(--sc-input-bg);
  color: var(--sc-accent);
}

.vareoncalc-brand img {
  height: 20px;
  width: auto;
  vertical-align: middle;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.vareoncalc-brand a:hover img {
  opacity: 1;
}

.vareoncalc-brand.vareoncalc-brand--outside-card {
  margin-top: 12px;
  padding-top: 0;
  border-top: none;
  justify-content: center;
  opacity: 1;
}

.vareoncalc-brand.vareoncalc-brand--outside-card .vareoncalc-brand-grid {
  justify-content: center;
}

.vareoncalc-brand.vareoncalc-brand--outside-card a:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #374151;
}

.vareoncalc-brand.vareoncalc-brand--outside-card[data-page-surface="dark"] a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e5e7eb;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav {
  margin: 0;
  padding: 0;
  border-top: none;
  opacity: 0.72;
  font-size: 11px;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav .vareoncalc-brand-grid {
  gap: 6px;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav .vareoncalc-brand-description {
  font-size: 11px;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav a {
  min-height: 20px;
  padding: 2px 4px;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav a:hover {
  background: transparent;
  color: inherit;
  opacity: 1;
}

.vareoncalc-brand.vareoncalc-brand--wizard-nav img {
  height: 14px;
}

/* Editor Styles */
/*
 * WordPress admin (.wp-core-ui) caps select elements at max-width: 25rem
 * (see wp/wp-admin/css/forms.css). Override here so calculator dropdowns
 * fill the full card width inside the Gutenberg editor preview.
 */
.vareoncalc-block-editor .vareoncalc-card select,
.editor-styles-wrapper .vareoncalc-card select {
  max-width: 100%;
}

.vareoncalc-block-editor {
  margin: 12px 0;
}

.vareoncalc-editor-header {
  padding: 8px 0;
  margin-bottom: 12px;
}

/* Alignment */
.vareoncalc-block-editor.alignleft,
.vareoncalc-block-editor.aligncenter,
.vareoncalc-block-editor.alignright,
.vareoncalc-align-wrap.alignleft,
.vareoncalc-align-wrap.aligncenter,
.vareoncalc-align-wrap.alignright {
  clear: both;
  display: block;
  float: none !important;
  max-width: 100%;
}

.vareoncalc-block-editor.alignwide,
.vareoncalc-block-editor.alignfull,
.vareoncalc-align-wrap.alignwide,
.vareoncalc-align-wrap.alignfull {
  clear: both;
  display: block;
  float: none !important;
  max-width: 1340px;
  margin-left: auto;
  margin-right: auto;
}

.vareoncalc-block-editor.alignleft,
.vareoncalc-align-wrap.alignleft > .vareoncalc,
.alignleft > .vareoncalc {
  margin-left: 0;
  margin-right: auto;
}

.vareoncalc-block-editor.aligncenter,
.vareoncalc-align-wrap.aligncenter > .vareoncalc,
.aligncenter > .vareoncalc {
  margin-left: auto;
  margin-right: auto;
}

.vareoncalc-block-editor.alignright,
.vareoncalc-align-wrap.alignright > .vareoncalc,
.alignright > .vareoncalc {
  margin-left: auto;
  margin-right: 0;
}

.vareoncalc-block-editor.alignleft,
.vareoncalc-block-editor.aligncenter,
.vareoncalc-block-editor.alignright,
.vareoncalc-align-wrap > .vareoncalc,
.alignleft > .vareoncalc,
.aligncenter > .vareoncalc,
.alignright > .vareoncalc {
  display: block;
  text-align: initial;
  max-width: 100%;
}

.vareoncalc-align-wrap.alignwide > .vareoncalc,
.vareoncalc-align-wrap.alignfull > .vareoncalc,
.alignwide > .vareoncalc,
.alignfull > .vareoncalc {
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design */
@media (max-width: 640px) {
  .vareoncalc-card {
    padding: var(--sc-card-padding);
    border-radius: 12px;
  }

  .vareoncalc-result-main {
    font-size: 24px;
  }

  .vareoncalc-btn {
    padding: 12px 16px;
    font-size: 15px;
  }

  .vareoncalc-card input,
  .vareoncalc-card select,
  .vareoncalc-card textarea {
    padding: 10px 12px;
    font-size: 15px;
  }
}

/* ========================================
   UPGRADE PROMPTS & PRO BADGES
   ======================================== */

/* Pro Badge */
.vareoncalc-pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  margin-left: 8px;
  vertical-align: middle;
  cursor: help;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Upgrade Prompt Container */
.vareoncalc-upgrade-prompt {
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.vareoncalc-upgrade-prompt--settings {
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-color: #3b82f6;
}

.vareoncalc-upgrade-prompt__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.vareoncalc-upgrade-prompt__icon {
  width: 32px;
  height: 32px;
  color: #3b82f6;
  flex-shrink: 0;
}

.vareoncalc-upgrade-prompt__title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #1e40af;
}

.vareoncalc-upgrade-prompt__content {
  margin-bottom: 20px;
}

.vareoncalc-upgrade-prompt__feature-group {
  margin-bottom: 20px;
}

.vareoncalc-upgrade-prompt__feature-group:last-child {
  margin-bottom: 0;
}

.vareoncalc-upgrade-prompt__feature-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--sc-card-text);
  margin: 0 0 12px 0;
}

.vareoncalc-upgrade-prompt__feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vareoncalc-upgrade-prompt__feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--sc-card-text);
  line-height: 1.5;
}

.vareoncalc-upgrade-prompt__feature-list li svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.vareoncalc-upgrade-prompt__footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.vareoncalc-upgrade-prompt__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: #3b82f6;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.vareoncalc-upgrade-prompt__button:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
  color: white;
}

.vareoncalc-upgrade-prompt__button:active {
  transform: translateY(0);
}

/* Feature Comparison Table */
.vareoncalc-comparison-table {
  overflow-x: auto;
  margin: 20px 0;
}

.vareoncalc-comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vareoncalc-comparison-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.vareoncalc-comparison-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vareoncalc-comparison-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

.vareoncalc-comparison-table tbody tr:last-child td {
  border-bottom: none;
}

.vareoncalc-comparison-table tbody tr:hover {
  background: #f9fafb;
}

.vareoncalc-comparison-table__feature {
  font-weight: 600;
  color: var(--sc-card-text);
}

.vareoncalc-comparison-table__lite {
  color: var(--sc-muted-text);
  text-align: center;
}

.vareoncalc-comparison-table__pro {
  color: #059669;
  font-weight: 600;
  text-align: center;
}

.vareoncalc-comparison-table__check {
  font-size: 18px;
  font-weight: 700;
}

.vareoncalc-comparison-table__check--yes {
  color: #059669;
}

.vareoncalc-comparison-table__check--no {
  color: #d1d5db;
}

/* Locked Feature State */
.vareoncalc-feature-locked {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.vareoncalc-feature-locked::after {
  content: '🔒';
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  font-size: 16px;
}

/* Admin Notice Customizations */
.vareoncalc-upgrade-notice {
  border-left-color: #3b82f6 !important;
}

.vareoncalc-upgrade-notice svg {
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 782px) {
  .vareoncalc-upgrade-prompt {
    padding: 16px;
  }

  .vareoncalc-upgrade-prompt__title {
    font-size: 18px;
  }

  .vareoncalc-upgrade-prompt__button {
    padding: 10px 20px;
    font-size: 13px;
  }

  .vareoncalc-comparison-table {
    font-size: 13px;
  }

  .vareoncalc-comparison-table th,
  .vareoncalc-comparison-table td {
    padding: 10px 12px;
  }
}

/* Compact Mode Styles */
.vareoncalc-advanced {
  margin: 12px 0;
}

.vareoncalc-advanced-toggle {
  width: 100%;
  padding: 10px 12px;
  background: var(--vareoncalc-card-bg, #f9fafb);
  border: 1px solid var(--vareoncalc-card-border, #e5e7eb);
  border-radius: 6px;
  color: var(--sc-card-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.vareoncalc-advanced-toggle:hover {
  background: var(--vareoncalc-input-bg, #f3f4f6);
  border-color: var(--vareoncalc-accent, #3b82f6);
}

.vareoncalc-advanced-toggle .toggle-icon {
  display: inline-block;
  font-size: 10px;
  transition: transform 0.2s ease;
  width: 12px;
  text-align: center;
}

.vareoncalc-advanced-toggle.open .toggle-icon {
  transform: rotate(90deg);
}

.vareoncalc-advanced-fields {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--vareoncalc-card-border, #e5e7eb);
  animation: slideDown 0.3s ease;
}

.vareoncalc-advanced-fields--hidden {
  display: none !important;
}

/* Universal Optional/Advanced Disclosure Pattern */
.vareoncalc-disclosure {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vareoncalc-disclosure--optional {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--sc-card-border, #d1d5db) 78%, var(--sc-accent, #3b82f6) 22%);
  background: color-mix(in srgb, var(--sc-card-bg, #ffffff) 95%, var(--sc-accent, #3b82f6) 5%);
}

.vareoncalc-disclosure__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* Intentional override of globally hidden section titles. */
.vareoncalc-root .vareoncalc-disclosure__title {
  display: block !important;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--sc-muted-text, #6b7280);
}

.vareoncalc-disclosure__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 220px;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--sc-card-border, #d1d5db);
  border-radius: 10px;
  background: var(--sc-input-bg, #f9fafb);
  color: var(--sc-card-text, #111827);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

/* Keep investment fine-tuning toggle compact by default. */
.invest-fine-tuning__toggle.vareoncalc-disclosure__toggle {
  flex: 0 0 auto;
}

button.vareoncalc-disclosure__toggle {
  margin: 0;
}

@media (min-width: 641px) {
  .vareoncalc-disclosure__toggle--compact {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
  }
}

.vareoncalc-disclosure__toggle:hover {
  border-color: var(--sc-accent, #3b82f6);
  background: color-mix(in srgb, var(--sc-input-bg, #f9fafb) 92%, var(--sc-accent, #3b82f6) 8%);
  color: var(--sc-accent, #3b82f6);
}

.vareoncalc-disclosure__toggle:focus-visible {
  outline: 2px solid var(--sc-accent, #3b82f6);
  outline-offset: 2px;
}

.vareoncalc-disclosure__toggle[aria-expanded="true"] {
  border-color: var(--sc-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
  color: var(--sc-accent, #3b82f6);
}

.vareoncalc-disclosure__icon {
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.vareoncalc-disclosure__toggle[aria-expanded="true"] .vareoncalc-disclosure__icon {
  transform: rotate(90deg);
}

.vareoncalc-disclosure__toggle--summary {
  width: 100%;
  list-style: none;
}

.vareoncalc-disclosure__toggle--summary::-webkit-details-marker {
  display: none;
}

.vareoncalc-disclosure__toggle--summary::after {
  content: ">";
  display: inline-block;
  font-size: 10px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.vareoncalc-disclosure[open] > .vareoncalc-disclosure__toggle--summary {
  border-color: var(--sc-accent, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
  color: var(--sc-accent, #3b82f6);
}

.vareoncalc-disclosure[open] > .vareoncalc-disclosure__toggle--summary::after {
  transform: rotate(90deg);
}

.vareoncalc-disclosure__cta {
  margin-left: auto;
}

.vareoncalc-disclosure__content {
  padding-top: 10px;
  border-top: 1px dashed var(--sc-card-border, #d1d5db);
}

.vareoncalc-disclosure__content[hidden] {
  display: none;
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure--optional,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure--optional {
  border-color: color-mix(in srgb, var(--sc-card-border, #374151) 84%, var(--sc-accent, #60a5fa) 16%);
  background: color-mix(in srgb, var(--sc-card-bg, #111827) 90%, var(--sc-accent, #60a5fa) 10%);
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure__title,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure__title {
  color: var(--sc-muted-text, #9ca3af);
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure__toggle,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure__toggle {
  background: var(--sc-input-bg, #1f2937);
  border-color: var(--sc-card-border, #374151);
  color: var(--sc-card-text, #f3f4f6);
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure__toggle:hover,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure__toggle:hover {
  background: color-mix(in srgb, var(--sc-input-bg, #1f2937) 84%, var(--sc-accent, #60a5fa) 16%);
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure__toggle[aria-expanded="true"],
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure__toggle[aria-expanded="true"],
.vareoncalc-root.theme-dark .vareoncalc-disclosure[open] > .vareoncalc-disclosure__toggle--summary,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure[open] > .vareoncalc-disclosure__toggle--summary {
  border-color: var(--sc-accent, #60a5fa);
  background: rgba(59, 130, 246, 0.22);
  color: var(--sc-accent, #60a5fa);
}

.vareoncalc-root.theme-dark .vareoncalc-disclosure__content,
.vareoncalc-root[data-theme="dark"] .vareoncalc-disclosure__content {
  border-top-color: var(--sc-card-border, #374151);
}

@media (max-width: 640px) {
  .vareoncalc-disclosure__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .vareoncalc-disclosure__toggle {
    width: 100%;
    flex: 1 1 auto;
  }
}

/* Standalone field wrapper for proper spacing */
.vareoncalc-field {
  margin-bottom: 12px;
}

.vareoncalc-field>label {
  display: block;
  margin-bottom: 8px;
}

.vareoncalc-field>input,
.vareoncalc-field>select {
  width: 100%;
  margin-bottom: 0;
}

/* Reset margin when field is inside row helpers */
.vareoncalc-field-row>.vareoncalc-field,
.vareoncalc-field-row--thirds>.vareoncalc-field {
  margin-bottom: 0;
}

/* ====================================
   Input Adornment Styles
   Unified prefix + suffix system
   ==================================== */

/* Wrapper for input + prefix/suffix */
.vareoncalc-input-adorned {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

/* Input inside adorned wrapper — default right padding for suffix */
.vareoncalc-input-adorned > input,
.vareoncalc-input-adorned > select {
  flex: 1;
  width: 100%;
  padding-right: 44px;
  margin-bottom: 0;
}

/* Suffix text — positioned inside input on the right */
.vareoncalc-input-suffix {
  position: absolute;
  right: 12px;
  top: 0;
  bottom: 0;
  height: 45px;
  max-height: 100%;
  margin-top: auto;
  margin-bottom: auto;
  display: flex;
  align-items: center;
  color: var(--sc-muted-text, #6b7280);
  font-size: 14px;
  font-weight: 500;
  opacity: 0.65;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Prefix text — positioned inside input on the left */
.vareoncalc-input-prefix {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  color: var(--sc-muted-text, #6b7280);
  font-size: 15px;
  font-weight: 500;
  opacity: 0.65;
  line-height: 1;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 1;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Adornments light up on focus */
.vareoncalc-input-adorned:focus-within .vareoncalc-input-suffix,
.vareoncalc-input-adorned:focus-within .vareoncalc-input-prefix {
  opacity: 1;
  color: var(--sc-accent, #3b82f6);
}

/* Input inside adorned wrapper with prefix — left padding */
.vareoncalc-input-adorned.vareoncalc-input-adorned--has-prefix > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--has-prefix > select,
.vareoncalc-input-adorned.vareoncalc-input-adorned--prefix > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--prefix > select {
  padding-left: calc(var(--prefix-width, 12px) + 22px);
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--has-prefix .vareoncalc-stepper > input[type="number"],
.vareoncalc-input-adorned.vareoncalc-input-adorned--prefix .vareoncalc-stepper > input[type="number"] {
  padding-left: calc(var(--prefix-width, 12px) + 22px);
}

/* Short suffix variant (1-2 char like % or $) */
.vareoncalc-input-adorned.vareoncalc-input-adorned--short > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--short > select {
  padding-right: 30px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--short .vareoncalc-input-suffix {
  right: 10px;
}

/* Ensure adorned inputs inside fields inherit proper width */
.vareoncalc-field > .vareoncalc-input-adorned {
  width: 100%;
}

/* Ensure error messages appear below the adorned wrapper */
.vareoncalc-input-adorned + .vareoncalc-error-msg,
.vareoncalc-input-adorned ~ .vareoncalc-error-msg {
  display: block;
  margin-top: 6px;
}

/* Dark theme adornment colors */
.vareoncalc-root.theme-dark .vareoncalc-input-suffix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-suffix,
.vareoncalc-root.theme-dark .vareoncalc-input-prefix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-prefix {
  color: rgba(249, 250, 251, 0.6);
}

.vareoncalc-root.theme-dark .vareoncalc-input-adorned:focus-within .vareoncalc-input-suffix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-adorned:focus-within .vareoncalc-input-suffix,
.vareoncalc-root.theme-dark .vareoncalc-input-adorned:focus-within .vareoncalc-input-prefix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-adorned:focus-within .vareoncalc-input-prefix {
  color: var(--sc-accent, #60a5fa);
  opacity: 1;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Wide Layout Styles - Two Column Grid */
.vareoncalc-card.layout-wide {
  max-width: 100%;
}

.vareoncalc-card.layout-wide .vareoncalc-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.vareoncalc-card.layout-wide .vareoncalc-form-grid>label,
.vareoncalc-card.layout-wide .vareoncalc-form-grid>input,
.vareoncalc-card.layout-wide .vareoncalc-form-grid>select {
  margin: 0;
}

.vareoncalc-card.layout-wide .vareoncalc-form-grid>label {
  grid-column: span 1;
  margin-bottom: 4px;
}

.vareoncalc-card.layout-wide .vareoncalc-form-grid>input,
.vareoncalc-card.layout-wide .vareoncalc-form-grid>select {
  grid-column: span 1;
}

/* Full width elements in wide layout */
.vareoncalc-card.layout-wide .vareoncalc-btn,
.vareoncalc-card.layout-wide .vareoncalc-out,
.vareoncalc-card.layout-wide .vareoncalc-advanced {
  grid-column: span 2;
}

/* Responsive: stack on small screens */
@media (max-width: 640px) {
  .vareoncalc-card.layout-wide .vareoncalc-form-grid {
    grid-template-columns: 1fr;
  }

  .vareoncalc-card.layout-wide .vareoncalc-form-grid>* {
    grid-column: span 1 !important;
  }
}

/* ====================================
   Control Panel Layout (Input/Result Split)
   Two-panel "Cash Register + Receipt" design
   ==================================== */

/* Main control panel container: side-by-side panels */
.vareoncalc-control-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  margin-bottom: 16px;
}

.vareoncalc-control-panel--stacked {
  grid-template-columns: 1fr;
}

.vareoncalc-control-panel--stacked .vareoncalc-panel-result {
  min-height: auto;
}

/* Left panel: Input Zone ("Cash Register") */
.vareoncalc-panel-input {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vareoncalc-panel-input .vareoncalc-field-row--full {
  width: 100%;
}

.vareoncalc-panel-input .vareoncalc-btn {
  margin-top: auto;
}

/* Right panel: Result Zone ("Receipt") - always visible */
.vareoncalc-panel-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--sc-input-bg, #f9fafb);
  border: 1px solid var(--sc-card-border, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  min-height: 280px;
}

/* Placeholder state (before calculation) */
.vareoncalc-panel-result--placeholder {
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--sc-muted-text, #6b7280);
  font-size: 14px;
  padding: var(--sc-card-padding);
}

.vareoncalc-panel-result--placeholder .placeholder-icon {
  font-size: 48px;
  opacity: 0.4;
  margin-bottom: 12px;
}

.vareoncalc-panel-result--placeholder .placeholder-text {
  opacity: 0.7;
}

/* Dark theme adjustments */
.vareoncalc-root[data-theme="dark"] .vareoncalc-panel-result,
.vareoncalc-root.theme-dark .vareoncalc-panel-result {
  background: var(--sc-input-bg, #1f2937);
}

/* Responsive: stack panels on smaller screens */
@media (max-width: 720px) {
  .vareoncalc-control-panel {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .vareoncalc-panel-result {
    min-height: auto;
  }
}

/* ====================================
   Field Row Helpers (layout utilities)
   ==================================== */

/* Full-width row (spans entire grid) */
.vareoncalc-field-row--full {
  grid-column: 1 / -1;
}

/* Two-column row wrapper: side-by-side fields */
.vareoncalc-field-row {
  display: flex;
  gap: 16px;
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.vareoncalc-field-row>.vareoncalc-field {
  flex: 1;
  min-width: 0;
}

.vareoncalc-field-row>.vareoncalc-field>label {
  display: block;
  margin-bottom: 8px;
}

.vareoncalc-field-row>.vareoncalc-field>input,
.vareoncalc-field-row>.vareoncalc-field>select {
  width: 100%;
  margin-bottom: 0;
}

/* Narrow field modifier for ft/in inputs */
.vareoncalc-field-row>.vareoncalc-field--narrow {
  flex: 0 0 auto;
  width: 80px;
  min-width: 70px;
  max-width: 100px;
}

/* Responsive: stack field rows on phones */
@media (max-width: 576px) {
  .vareoncalc-field-row {
    flex-direction: column;
    gap: 12px;
  }

  .vareoncalc-field-row>.vareoncalc-field--narrow {
    width: 100%;
    max-width: none;
  }
}

/* Three-column row wrapper for equation-style layouts */
.vareoncalc-field-row--thirds {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.vareoncalc-field-row--thirds>.vareoncalc-field {
  min-width: 0;
}

.vareoncalc-field-row--thirds>.vareoncalc-field>label {
  display: block;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vareoncalc-field-row--thirds>.vareoncalc-field>input,
.vareoncalc-field-row--thirds>.vareoncalc-field>select {
  width: 100%;
  margin-bottom: 0;
}

/* Responsive: stack three-column rows on phones */
@media (max-width: 576px) {
  .vareoncalc-field-row--thirds {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* Four-column row helper for multiplier "settings bar" layouts */
.vareoncalc-field-row--quads {
  display: flex;
  gap: 12px;
  grid-column: 1 / -1;
  margin-bottom: 12px;
}

.vareoncalc-field-row--quads>.vareoncalc-field {
  flex: 1;
  min-width: 0;
}

.vareoncalc-field-row--quads>.vareoncalc-field>label {
  display: block;
  margin-bottom: 8px;
}

.vareoncalc-field-row--quads>.vareoncalc-field>input,
.vareoncalc-field-row--quads>.vareoncalc-field>select {
  width: 100%;
  margin-bottom: 0;
}

/* Responsive: stack four-column rows on tablets and below */
@media (max-width: 768px) {
  .vareoncalc-field-row--quads {
    flex-wrap: wrap;
  }

  .vareoncalc-field-row--quads>.vareoncalc-field {
    flex: 1 1 calc(50% - 6px);
  }
}

@media (max-width: 480px) {
  .vareoncalc-field-row--quads {
    flex-direction: column;
    gap: 12px;
  }

  .vareoncalc-field-row--quads>.vareoncalc-field {
    flex: 1 1 100%;
  }
}

/* ====================================
   Design Controls - Corner Radius
   ==================================== */
.vareoncalc-radius-sharp .vareoncalc-card {
  border-radius: 4px;
}

.vareoncalc-radius-soft .vareoncalc-card {
  border-radius: 8px;
}

.vareoncalc-radius-rounded .vareoncalc-card {
  border-radius: 12px;
}

.vareoncalc-radius-pill .vareoncalc-card {
  border-radius: 24px;
}

/* Apply corner radius to buttons and inputs within the card */
.vareoncalc-radius-sharp .vareoncalc-btn {
  border-radius: 3px;
}

.vareoncalc-radius-soft .vareoncalc-btn {
  border-radius: 6px;
}

.vareoncalc-radius-rounded .vareoncalc-btn {
  border-radius: 8px;
}

.vareoncalc-radius-pill .vareoncalc-btn {
  border-radius: 999px;
}

.vareoncalc-radius-sharp .vareoncalc-input,
.vareoncalc-radius-sharp .vareoncalc-select {
  border-radius: 3px;
}

.vareoncalc-radius-soft .vareoncalc-input,
.vareoncalc-radius-soft .vareoncalc-select {
  border-radius: 6px;
}

.vareoncalc-radius-rounded .vareoncalc-input,
.vareoncalc-radius-rounded .vareoncalc-select {
  border-radius: 8px;
}

.vareoncalc-radius-pill .vareoncalc-input,
.vareoncalc-radius-pill .vareoncalc-select {
  border-radius: 999px;
}

/* ====================================
   Design Controls - Shadow Style
   ==================================== */
.vareoncalc-shadow-none .vareoncalc-card {
  box-shadow: none;
}

.vareoncalc-shadow-soft .vareoncalc-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vareoncalc-shadow-medium .vareoncalc-card {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vareoncalc-shadow-strong .vareoncalc-card {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ====================================
   Design Controls - Spacing Density
   ==================================== */
.vareoncalc-spacing-tight .vareoncalc-card {
  --sc-card-padding: 12px;
  padding: 12px;
}

.vareoncalc-spacing-normal .vareoncalc-card {
  --sc-card-padding: 16px;
  padding: 16px;
}

.vareoncalc-spacing-relaxed .vareoncalc-card {
  --sc-card-padding: 24px;
  padding: 24px;
}

.vareoncalc-spacing-tight .vareoncalc-field,
.vareoncalc-spacing-tight .vareoncalc-result,
.vareoncalc-spacing-tight .vareoncalc-actions {
  margin-bottom: 12px;
}

.vareoncalc-spacing-normal .vareoncalc-field,
.vareoncalc-spacing-normal .vareoncalc-result,
.vareoncalc-spacing-normal .vareoncalc-actions {
  margin-bottom: 16px;
}

.vareoncalc-spacing-relaxed .vareoncalc-field,
.vareoncalc-spacing-relaxed .vareoncalc-result,
.vareoncalc-spacing-relaxed .vareoncalc-actions {
  margin-bottom: 24px;
}

/* ====================================
   Design Controls - Button Styles
   ==================================== */
/* Solid button style (default) */
.vareoncalc-button-solid .vareoncalc-btn {
  background: var(--sc-button-bg);
  color: var(--sc-button-text);
  border: none;
}

.vareoncalc-button-solid .vareoncalc-btn:hover {
  background: var(--sc-button-hover);
}

/* Outline button style */
.vareoncalc-button-outline .vareoncalc-btn {
  background: transparent;
  color: var(--sc-button-bg);
  border: 2px solid var(--sc-button-bg);
}

.vareoncalc-button-outline .vareoncalc-btn:hover {
  background: var(--sc-button-bg);
  color: var(--sc-button-text);
}

/* Ghost button style */
.vareoncalc-button-ghost .vareoncalc-btn {
  background: transparent;
  color: var(--sc-button-bg);
  border: none;
}

.vareoncalc-button-ghost .vareoncalc-btn:hover {
  background: rgba(59, 130, 246, 0.1);
}

/* Gradient button style */
.vareoncalc-button-gradient .vareoncalc-btn {
  background: linear-gradient(135deg, var(--sc-button-bg) 0%, var(--sc-button-hover) 100%);
  color: var(--sc-button-text);
  border: none;
}

.vareoncalc-button-gradient .vareoncalc-btn:hover {
  background: linear-gradient(135deg, var(--sc-button-hover) 0%, var(--sc-button-bg) 100%);
}

/* Calculator Title Section */
.vareoncalc-title-section {
  padding: 10px 0 12px;
  margin: 0 calc(var(--sc-card-padding, 16px) * -1);
  padding-left: var(--sc-card-padding, 16px);
  padding-right: var(--sc-card-padding, 16px);
  border-top-left-radius: var(--sc-border-radius);
  border-top-right-radius: var(--sc-border-radius);
  border-bottom: 1px solid var(--vareoncalc-card-border, #e5e7eb);
}

.vareoncalc-root.theme-dark .vareoncalc-title-section,
.vareoncalc-root[data-theme="dark"] .vareoncalc-title-section {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.vareoncalc-title {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.3;
  margin: 0;
  padding: 0;
}

/* Calculator Content Wrapper */
.vareoncalc-content {
  padding-top: 8px;
  color: var(--sc-card-text);
}

/* Remove content padding when a wizard shell is a direct child so the
   wizard header can sit flush against the card edge. Use :has(> …) only
   (not …:first-child): innerHTML often inserts a leading text node, so the
   shell is not :first-child even when it is the first element. */
.vareoncalc-content:has(> .vareoncalc-shell--wizard) {
  padding-top: 0;
}

/* ====================================
   Universal Layout Shell
   ==================================== */
.vareoncalc-shell {
  display: flex;
  flex-direction: column;
  gap: var(--sc-row-gap);
}

.vareoncalc-shell__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vareoncalc-shell__body,
.vareoncalc-shell__results,
.vareoncalc-shell__footer {
  display: block;
}

.vareoncalc-shell__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vareoncalc-shell--single .vareoncalc-shell__body,
.vareoncalc-shell--split .vareoncalc-shell__body,
.vareoncalc-shell--wizard .vareoncalc-shell__body {
  width: 100%;
}

/* ====================================
   Compact Two-Step Layout (Universal)
   ==================================== */
.vareoncalc-two-step {
  position: relative;
  display: block;
  width: 100%;
  box-sizing: border-box;
}

.vareoncalc-two-step__step {
  display: none;
  width: 100%;
  box-sizing: border-box;
}

.vareoncalc-two-step__step--active {
  display: block;
}

.vareoncalc-two-step__step[aria-hidden="true"] {
  display: none;
}

.vareoncalc-two-step__results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.vareoncalc-two-step__drawer-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  margin-top: 12px;
  border-radius: 999px;
  border: 1px dashed var(--sc-card-border);
  background: transparent;
  color: var(--sc-muted-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vareoncalc-two-step__drawer-toggle:hover {
  border-color: var(--sc-accent);
  color: var(--sc-accent);
  background: var(--sc-input-bg);
}

.vareoncalc-two-step__drawer-toggle:focus-visible {
  outline: 2px solid var(--sc-accent);
  outline-offset: 2px;
}

.vareoncalc-two-step--drawer-open .vareoncalc-two-step__step--results {
  display: block;
  visibility: hidden;
  pointer-events: none;
}

.vareoncalc-two-step--drawer-open .vareoncalc-two-step__step--inputs {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  max-height: min(85vh, 820px);
  z-index: 20;
  background: var(--sc-card-bg);
  border: 1px solid var(--sc-card-border);
  border-radius: var(--sc-border-radius);
  box-shadow: var(--sc-card-shadow);
  overflow-y: auto;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  animation: vareoncalcTwoStepSlideIn 0.2s ease;
}

@keyframes vareoncalcTwoStepSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====================================
   Compact Two-Step Layout (Blind Mode)
   ==================================== */
.vareoncalc-two-step--blind {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  --sc-two-step-handle-height: 40px;
}

.vareoncalc-two-step--blind.is-animating {
  overflow: hidden;
  transition: min-height 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: min-height;
}

.vareoncalc-two-step--blind[data-step="inputs"]:not(.is-animating) {
  overflow: visible;
}

.vareoncalc-two-step--blind .vareoncalc-two-step__step,
.vareoncalc-two-step--blind .vareoncalc-two-step__step[aria-hidden="true"] {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  box-sizing: border-box;
}

/* When not animating, keep the active step in normal document flow so the
   container naturally sizes to the content height at any zoom level. */
.vareoncalc-two-step--blind[data-step="inputs"]:not(.is-animating) .vareoncalc-two-step__step--inputs,
.vareoncalc-two-step--blind[data-step="results"]:not(.is-animating) .vareoncalc-two-step__step--results {
  position: relative;
  inset: auto;
}

.vareoncalc-two-step--blind .vareoncalc-two-step__step--results {
  z-index: 0;
  transform: scale(0.98);
  opacity: 0.8;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.vareoncalc-two-step--blind[data-step="inputs"] .vareoncalc-two-step__step--results {
  opacity: 0;
  visibility: hidden;
}

.vareoncalc-two-step--blind[data-step="results"] .vareoncalc-two-step__step--results {
  transform: scale(1);
  opacity: 1;
}

/* Keep results fully visible when active class is present (state fallback). */
.vareoncalc-two-step--blind .vareoncalc-two-step__step--results.vareoncalc-two-step__step--active {
  transform: scale(1);
  opacity: 1;
}

.vareoncalc-two-step--blind[data-step="results"] .vareoncalc-two-step__results {
  padding-bottom: calc(var(--sc-two-step-handle-height) + 8px);
}

.vareoncalc-two-step--blind .vareoncalc-two-step__step--inputs {
  z-index: 1;
  display: flex;
  flex-direction: column;
  background: var(--sc-card-bg);
  border-radius: var(--sc-border-radius);
  box-shadow: none;
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.3s ease;
  background-image: none;
}

.vareoncalc-two-step--blind[data-step="inputs"] .vareoncalc-two-step__step--inputs {
  background-image: none;
}

.vareoncalc-two-step--blind[data-step="results"] .vareoncalc-two-step__step--inputs {
  transform: translateY(100%);
  box-shadow: none;
}

.vareoncalc-two-step--blind .vareoncalc-two-step__inputs-body {
  flex: 0 0 auto;
}

.vareoncalc-two-step--blind[data-step="results"] .vareoncalc-two-step__inputs-body {
  pointer-events: none;
  user-select: none;
}

.vareoncalc-two-step__blind-handle {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: var(--sc-two-step-handle-height);
  box-sizing: border-box;
  padding: 0 16px;
  border: none;
  border-top: 1px dashed var(--sc-card-border);
  background: var(--sc-card-bg);
  color: var(--sc-muted-text);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.vareoncalc-two-step--blind .vareoncalc-two-step__blind-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  border-radius: 0 0 var(--sc-border-radius) var(--sc-border-radius);
}

.vareoncalc-two-step__blind-handle-grip {
  display: none;
}

.vareoncalc-two-step--blind[data-step="inputs"] .vareoncalc-two-step__blind-handle {
  display: none;
}

.vareoncalc-two-step__blind-handle:hover,
.vareoncalc-two-step__blind-handle:focus-visible {
  color: var(--sc-accent);
  border-top-color: var(--sc-accent);
  background: var(--sc-input-bg);
}

.vareoncalc-two-step__blind-handle:focus-visible {
  outline: 2px solid var(--sc-accent);
  outline-offset: -2px;
}

.vareoncalc-two-step__blind-handle svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.vareoncalc-two-step__blind-handle:hover svg,
.vareoncalc-two-step__blind-handle:focus-visible svg {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {

  .vareoncalc-two-step--blind.is-animating,
  .vareoncalc-two-step--blind .vareoncalc-two-step__step--results,
  .vareoncalc-two-step--blind .vareoncalc-two-step__step--inputs,
  .vareoncalc-two-step__blind-handle {
    transition: none;
  }
}

/* ====================================
  Universal Wizard Layout (Reworked)
  ==================================== */

.vareoncalc-wizard {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.vareoncalc-wizard__header,
.vareoncalc-wizard__track,
.vareoncalc-wizard__body,
.vareoncalc-wizard__nav,
.vareoncalc-wizard__results {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* ── Header panel ── */

.vareoncalc-wizard__header {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  --sc-wizard-header-radius: var(--sc-border-radius);
  /* Pull header flush against the card edges (top + sides) */
  width: calc(100% + (var(--sc-card-padding, 16px) * 2));
  max-width: none;
  box-sizing: border-box;
  margin: calc((var(--sc-card-padding, 16px) + var(--vareoncalc-border-width, 1px)) * -1)
    calc(var(--sc-card-padding, 16px) * -1)
    0;
  padding: 18px var(--sc-card-padding, 16px);
  border: none;
  border-top-left-radius: var(--sc-wizard-header-radius);
  border-top-right-radius: var(--sc-wizard-header-radius);
  background: var(--sc-input-bg, #f9fafb);
  position: relative;
  overflow: hidden;
}

.vareoncalc-wizard__header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1;
  border-top-left-radius: var(--sc-wizard-header-radius);
  border-top-right-radius: var(--sc-wizard-header-radius);
  background: linear-gradient(
    90deg,
    var(--sc-accent, #3b82f6),
    var(--sc-button-hover, #2563eb)
  );
}

/* Step indicator badge */

.vareoncalc-wizard__indicator {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sc-accent, #3b82f6);
  background: var(--sc-card-bg, #fff);
  border-radius: 999px;
  line-height: 1.6;
  margin-bottom: 2px;
}

/* Step title */

.vareoncalc-wizard__title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--sc-card-text);
  width: 100%;
  flex: 1 1 auto;
}

/* Step subtitle */

.vareoncalc-wizard__subtitle {
  margin: 0;
  font-size: 0.84rem;
  color: var(--sc-muted-text);
  line-height: 1.45;
}

/* Progress bar */

.vareoncalc-wizard__progress {
  margin-top: 8px;
  height: 6px;
  background: var(--sc-card-bg, #fff);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.vareoncalc-wizard__progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--sc-accent, #3b82f6),
    var(--sc-button-hover, #2563eb)
  );
  border-radius: inherit;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.vareoncalc-wizard__progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent);
  border-radius: inherit;
}

/* ── Track (connected stepper) ── */

.vareoncalc-wizard__track {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 4px 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.vareoncalc-wizard__track-step {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid var(--sc-card-border, #e5e7eb);
  background: var(--sc-card-bg, #fff);
  color: var(--sc-muted-text, #6b7280);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
  flex-shrink: 0;
}

/* Connector line between steps */

.vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step {
  margin-left: 28px;
}

.vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step::before {
  content: '';
  position: absolute;
  right: calc(100% + 2px);
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 2px;
  background: var(--sc-card-border, #e5e7eb);
  transition: background 0.3s ease;
  z-index: 0;
}

.vareoncalc-wizard__track-step:hover:not([disabled]) {
  border-color: var(--sc-accent, #3b82f6);
  color: var(--sc-accent, #3b82f6);
}

/* Active step */

.vareoncalc-wizard__track-step.is-active {
  background: var(--sc-accent, #3b82f6);
  border-color: var(--sc-accent, #3b82f6);
  color: var(--sc-accent-text, #fff);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  transform: scale(1.05);
}

/* Complete step with checkmark */

.vareoncalc-wizard__track-step.is-complete {
  background: var(--sc-accent, #3b82f6);
  border-color: var(--sc-accent, #3b82f6);
  color: var(--sc-accent-text, #fff);
  font-size: 0;
}

.vareoncalc-wizard__track-step.is-complete::after {
  content: '';
  display: block;
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg) translateY(-1px);
}

/* Connector fills when following a complete step */

.vareoncalc-wizard__track-step.is-complete + .vareoncalc-wizard__track-step::before {
  background: var(--sc-accent, #3b82f6);
}

.vareoncalc-wizard__track-step[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.vareoncalc-wizard__track-step:focus-visible {
  outline: 2px solid var(--sc-accent, #3b82f6);
  outline-offset: 3px;
}

/* ── Step content ── */

.vareoncalc-wizard__step {
  display: none;
  width: 100%;
}

.vareoncalc-wizard__step--active {
  display: block;
  animation: wizardStepIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes wizardStepIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Navigation ── */

.vareoncalc-wizard__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  margin: 2px calc(var(--sc-card-padding, 16px) * -1) 0;
  padding: 14px var(--sc-card-padding, 16px) 0;
  border-top: 1px solid var(--sc-card-border, #e5e7eb);
}

.vareoncalc-wizard__nav [data-wizard-back] {
  margin-right: auto;
}

.vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded [data-wizard-back] {
  margin-right: 0;
}

.vareoncalc-wizard__nav-left,
.vareoncalc-wizard__nav-center,
.vareoncalc-wizard__nav-right {
  min-width: 0;
}

.vareoncalc-wizard__nav-left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.vareoncalc-wizard__nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.vareoncalc-wizard__nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.vareoncalc-wizard__nav .vareoncalc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  padding: 10px 22px;
  font-size: 13.5px;
  font-weight: 600;
  margin-top: 0;
  border-radius: 10px;
  box-shadow: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.vareoncalc-wizard__nav .vareoncalc-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.vareoncalc-wizard__nav .vareoncalc-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.vareoncalc-wizard__nav .vareoncalc-btn--outline {
  background: transparent;
  color: var(--sc-muted-text, #6b7280);
  border: 1px solid var(--sc-card-border, #e5e7eb);
}

.vareoncalc-wizard__nav .vareoncalc-btn--outline:hover:not(:disabled) {
  color: var(--sc-accent, #3b82f6);
  border-color: var(--sc-accent, #3b82f6);
  background: transparent;
  box-shadow: none;
}

/* Hide nav in results state */

.vareoncalc-wizard[data-wizard-state="results"] .vareoncalc-wizard__nav {
  display: none;
}

@media (min-width: 641px) {
  .vareoncalc-root:has(.vareoncalc-wizard .vareoncalc-wizard__nav--branded):not(:has(.vareoncalc-wizard[data-wizard-state="results"])) + .vareoncalc-brand--wizard-outside {
    display: none;
  }

  .vareoncalc-root:has(.vareoncalc-wizard[data-wizard-state="results"]) + .vareoncalc-brand--wizard-outside {
    display: flex;
  }
}

/* ── Results ── */

.vareoncalc-wizard__results {
  display: none;
  width: 100%;
}

.vareoncalc-wizard__results--active {
  display: block;
  animation: wizardResultsIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes wizardResultsIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {

  .vareoncalc-wizard__step--active,
  .vareoncalc-wizard__results--active {
    animation: none;
  }

  .vareoncalc-wizard__progress-fill {
    transition: none;
  }

  .vareoncalc-wizard__track-step {
    transition: none;
  }

  .vareoncalc-wizard__nav .vareoncalc-btn {
    transition: none;
  }
}

/* ── Mobile ── */

@media (max-width: 600px) {

  .vareoncalc-wizard {
    gap: 16px;
  }

  .vareoncalc-wizard__header {
    padding: 14px var(--sc-card-padding, 16px);
  }

  .vareoncalc-wizard__nav {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .vareoncalc-wizard__nav [data-wizard-back] {
    margin-right: auto;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-left {
    margin-right: auto;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-center {
    display: none !important;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-right {
    justify-content: flex-end;
  }

  .vareoncalc-wizard__nav .vareoncalc-btn {
    width: auto;
    flex: 0 0 auto;
    padding: 9px 16px;
  }

  .vareoncalc-wizard__track-step {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
  }

  .vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step {
    margin-left: 20px;
  }

  .vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step::before {
    width: 16px;
  }
}

@media (max-width: 640px) {
  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-left {
    margin-right: auto;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-center {
    display: none !important;
  }

  .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-right {
    justify-content: flex-end;
  }

  .vareoncalc-root + .vareoncalc-brand--wizard-outside {
    display: flex;
  }
}

/* ====================================
   Universal Tooltip (theme-aware)
   ==================================== */

/* Allow tooltips to escape container boundaries */
.vareoncalc-root,
.vareoncalc-root .vareoncalc-card,
.vareoncalc-root label,
.vareoncalc-root .vareoncalc-field,
.vareoncalc-root .vareoncalc-input,
.vareoncalc-root [class*="wizard-step"],
.vareoncalc-root [class*="wizard-fields"],
.vareoncalc-root [class*="-grid"],
.vareoncalc-root [class*="-row"],
.vareoncalc-root [class*="-card"],
.vareoncalc-root [class*="-section"],
.vareoncalc-root [class*="-panel"],
.vareoncalc-root [class*="-form"],
.vareoncalc-root .subscription-results-hero,
.vareoncalc-root .subscription-results-shell,
.vareoncalc-root .subscription-headline,
.vareoncalc-root .subscription-headline__arr,
.vareoncalc-root .subscription-metrics-row,
.vareoncalc-root .subscription-scorecard {
  overflow: visible !important;
}

/* Restore overflow:hidden on elements that need it for visual rounding or
   layout but do NOT contain tooltip triggers. */
.vareoncalc-root .vareoncalc-wizard__header,
.vareoncalc-root .vareoncalc-wizard__progress,
.vareoncalc-root .vareoncalc-panel-result,
.vareoncalc-root .vareoncalc-comparison-table table,
.vareoncalc-root [class*="progress-track"],
.vareoncalc-root [class*="bar-track"],
.vareoncalc-root [class*="composition-bar"],
.vareoncalc-root [class*="results-bar"],
.vareoncalc-root [class*="__report"],
.vareoncalc-root [class*="results-tabs__header"] {
  overflow: hidden !important;
}

/* Two-step blind needs overflow:hidden except when showing inputs idle */
.vareoncalc-root .vareoncalc-two-step--blind {
  overflow: hidden !important;
}
.vareoncalc-root .vareoncalc-two-step--blind[data-step="inputs"]:not(.is-animating) {
  overflow: visible !important;
}

/* Containers that lost overflow:hidden need rounding on first/last children
   so backgrounds still respect the parent border-radius. */
.vareoncalc-root .mortgage-card > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.vareoncalc-root .mortgage-card > :last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.vareoncalc-root .gpa-form-section > :first-child {
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}
.vareoncalc-root .gpa-form-section > :last-child {
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

/* Also handle Gutenberg editor preview containers */
.vareoncalc-preview-frame,
.block-editor-block-list__block .vareoncalc-root,
.wp-block .vareoncalc-root,
[data-type*="vareoncalc"] .vareoncalc-root,
.vareoncalc-block-editor,
.vareoncalc-editor-preview-shell,
.vareoncalc-editor-preview-host {
  overflow: visible !important;
}

/* When JS portal is active, render bubbles outside clipping containers. */
body.vareoncalc-tooltip-portal-active .vareoncalc-root .vareoncalc-tooltip[data-tooltip]::after,
body.vareoncalc-tooltip-portal-active .vareoncalc-root .vareoncalc-tooltip[data-tooltip]::before,
body.vareoncalc-tooltip-portal-active .vareoncalc-root .vareoncalc-help-icon[data-tooltip]::after,
body.vareoncalc-tooltip-portal-active .vareoncalc-root .vareoncalc-help-icon[data-tooltip]::before {
  display: none !important;
}

/* Body-appended tooltip portal for universal anti-clipping behavior */
body #vareoncalc-tooltip-portal.vareoncalc-tooltip-portal {
  --vc-tooltip-bg: #111827;
  --vc-tooltip-text: #ffffff;
  --vareoncalc-tooltip-arrow-left: 50%;
  position: fixed;
  top: 0;
  left: 0;
  max-width: 240px;
  padding: 8px 12px;
  background: var(--vc-tooltip-bg);
  color: var(--vc-tooltip-text);
  font-size: 11px;
  line-height: 1.45;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  z-index: 2147483600;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  pointer-events: none;
  text-align: left;
}

body #vareoncalc-tooltip-portal.vareoncalc-tooltip-portal.is-visible {
  opacity: 1;
  visibility: visible;
}

body #vareoncalc-tooltip-portal.vareoncalc-tooltip-portal::after {
  content: '';
  position: absolute;
  left: var(--vareoncalc-tooltip-arrow-left);
  transform: translateX(-50%);
  border: 6px solid transparent;
}

body #vareoncalc-tooltip-portal.vareoncalc-tooltip-portal[data-placement='top']::after {
  top: 100%;
  border-top-color: var(--vc-tooltip-bg);
}

body #vareoncalc-tooltip-portal.vareoncalc-tooltip-portal[data-placement='bottom']::after {
  bottom: 100%;
  border-bottom-color: var(--vc-tooltip-bg);
}

/* Base icon styles */
.vareoncalc-tooltip,
.vareoncalc-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 2px;
  background: transparent;
  border: 1px solid var(--sc-muted-text, #9ca3af);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  color: var(--sc-muted-text, #9ca3af);
  cursor: help;
  position: relative;
  z-index: 2;
  vertical-align: super;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  flex-shrink: 0;
}

.vareoncalc-tooltip:hover,
.vareoncalc-tooltip:focus-visible,
.vareoncalc-help-icon:hover,
.vareoncalc-help-icon:focus-visible {
  background: var(--sc-accent);
  border-color: var(--sc-accent);
  color: var(--sc-button-text, #fff);
  z-index: 2147483000;
}

/* Text-hover trigger (default for Pro calculators) */
.vareoncalc-tooltip[data-tooltip-trigger="text"],
.vareoncalc-help-icon[data-tooltip-trigger="text"] {
  display: inline;
  width: auto;
  height: auto;
  margin-left: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  vertical-align: baseline;
  white-space: inherit;
  text-decoration: underline dotted;
  text-decoration-color: color-mix(in srgb, var(--sc-muted-text, #64748b) 72%, transparent);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.vareoncalc-tooltip[data-tooltip-trigger="text"]:hover,
.vareoncalc-tooltip[data-tooltip-trigger="text"]:focus-visible,
.vareoncalc-help-icon[data-tooltip-trigger="text"]:hover,
.vareoncalc-help-icon[data-tooltip-trigger="text"]:focus-visible {
  background: transparent;
  border-color: transparent;
  color: var(--sc-accent, #2563eb);
  text-decoration-color: currentColor;
}

.vareoncalc-tooltip[data-tooltip-trigger="text"]:focus-visible,
.vareoncalc-help-icon[data-tooltip-trigger="text"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--sc-accent, #2563eb) 45%, transparent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Tooltip bubble */
.vareoncalc-tooltip[data-tooltip]::after,
.vareoncalc-help-icon[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  background: var(--sc-card-text);
  color: var(--sc-card-bg);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  width: max-content;
  max-width: 200px;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.13);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 99999;
  pointer-events: none;
  text-align: left;
}

/* Tooltip arrow */
.vareoncalc-tooltip[data-tooltip]::before,
.vareoncalc-help-icon[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--sc-card-text);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
  z-index: 99999;
}

/* Show on hover and focus */
.vareoncalc-tooltip:hover[data-tooltip]::after,
.vareoncalc-tooltip:hover[data-tooltip]::before,
.vareoncalc-tooltip:focus-visible[data-tooltip]::after,
.vareoncalc-tooltip:focus-visible[data-tooltip]::before,
.vareoncalc-help-icon:hover[data-tooltip]::after,
.vareoncalc-help-icon:hover[data-tooltip]::before,
.vareoncalc-help-icon:focus-visible[data-tooltip]::after,
.vareoncalc-help-icon:focus-visible[data-tooltip]::before {
  opacity: 1;
  visibility: visible;
}

/* Edge alignment helpers */
.vareoncalc-tooltip[data-tooltip-align="left"]::after,
.vareoncalc-help-icon[data-tooltip-align="left"]::after {
  left: 0;
  transform: translateX(0);
}

.vareoncalc-tooltip[data-tooltip-align="left"]::before,
.vareoncalc-help-icon[data-tooltip-align="left"]::before {
  left: 6px;
  transform: translateX(0);
}

.vareoncalc-tooltip[data-tooltip-align="right"]::after,
.vareoncalc-help-icon[data-tooltip-align="right"]::after {
  left: auto;
  right: 0;
  transform: translateX(0);
}

.vareoncalc-tooltip[data-tooltip-align="right"]::before,
.vareoncalc-help-icon[data-tooltip-align="right"]::before {
  left: auto;
  right: 6px;
  transform: translateX(0);
}

/* ====================================
   Number Input Steppers
   ==================================== */

/* Stepper wrapper */
.vareoncalc-stepper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.vareoncalc-stepper>input[type="number"] {
  flex: 1;
  width: 100%;
  padding-right: 28px;
  /* Space for stepper buttons */
}

/* Button container (stacked vertically on the right) */
.vareoncalc-stepper__buttons {
  position: absolute;
  right: 1px;
  top: 45%;
  transform: translateY(-60%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1;
}

/* Stepper buttons - force simple black/white + transparent backgrounds (theme-safe) */
.vareoncalc-root .vareoncalc-stepper__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 12px;
  padding: 0;
  margin: 0;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #000000 !important;
  cursor: pointer;
  border-radius: 2px;
}

.vareoncalc-root .vareoncalc-stepper__btn:hover {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #000000 !important;
}

.vareoncalc-root .vareoncalc-stepper__btn:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #000000 !important;
}

.vareoncalc-root .vareoncalc-stepper__btn:focus-visible {
  outline: 2px solid var(--sc-focus-ring, var(--sc-accent, #3b82f6));
  outline-offset: 0;
}

/* Stepper icon */
.vareoncalc-stepper__icon {
  display: block;
  width: 10px;
  height: 10px;
  flex-shrink: 0;
}

/* Integration with InputAdornment */
.vareoncalc-input-adorned .vareoncalc-stepper {
  flex: 1;
  width: auto;
}

.vareoncalc-input-adorned .vareoncalc-stepper>input[type="number"] {
  padding-right: 28px;
}

/* When both suffix and stepper are present */
.vareoncalc-input-adorned:has(.vareoncalc-stepper)>.vareoncalc-input-suffix {
  right: 28px;
  /* Move suffix to the left of stepper buttons */
}

.vareoncalc-input-adorned:has(.vareoncalc-stepper) .vareoncalc-stepper>input[type="number"] {
  padding-right: 56px;
  /* Space for both suffix and stepper */
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--short:has(.vareoncalc-stepper)>.vareoncalc-input-suffix {
  right: 28px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--short:has(.vareoncalc-stepper) .vareoncalc-stepper>input[type="number"] {
  padding-right: 48px;
}

/* Universal right-side suffix rail (supports legacy loan class during migration) */
.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail {
  --sc-suffix-rail-min-width: 18px;
  --sc-suffix-rail-max-width: 44px;
  --sc-suffix-rail-fluid-width: 30%;
  --sc-suffix-rail-width: clamp(var(--sc-suffix-rail-min-width), var(--sc-suffix-rail-fluid-width), var(--sc-suffix-rail-max-width));
  --sc-suffix-rail-padding-inline: clamp(2px, 0.8vw, 6px);
  --sc-suffix-slot-right: 8px;
  --sc-suffix-text-gap: 4px;
  --sc-suffix-visible-width: 16px;
  --sc-suffix-center-nudge: -1px;
  --sc-spinner-gap: 4px;
  --sc-stepper-gap: 6px;
  --sc-stepper-zone-width: 0px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-symbol,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-symbol {
  --sc-suffix-rail-min-width: 14px;
  --sc-suffix-rail-max-width: 28px;
  --sc-suffix-rail-fluid-width: 18%;
  --sc-suffix-rail-padding-inline: clamp(1px, 0.5vw, 4px);
  --sc-suffix-visible-width: 10px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-currency,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-currency {
  --sc-suffix-rail-min-width: 18px;
  --sc-suffix-rail-max-width: 46px;
  --sc-suffix-rail-fluid-width: 24%;
  --sc-suffix-rail-padding-inline: clamp(2px, 0.6vw, 5px);
  --sc-suffix-visible-width: 14px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-unit,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-unit {
  --sc-suffix-rail-min-width: 24px;
  --sc-suffix-rail-max-width: 60px;
  --sc-suffix-rail-fluid-width: 40%;
  --sc-suffix-rail-padding-inline: clamp(2px, 0.9vw, 6px);
  --sc-suffix-visible-width: 28px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail:has(.vareoncalc-stepper),
.vareoncalc-input-adorned.vareoncalc-loan-input-rail:has(.vareoncalc-stepper) {
  --sc-stepper-zone-width: 22px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail > select,
.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--short > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--short > select,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail > input,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail > select,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--short > input,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--short > select {
  /* Reserve enough room for floating suffix text without reintroducing a boxed side rail. */
  padding-right: calc(var(--sc-suffix-rail-width) + var(--sc-suffix-slot-right) + var(--sc-suffix-text-gap));
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail input[type="number"],
.vareoncalc-input-adorned.vareoncalc-loan-input-rail input[type="number"] {
  appearance: auto;
  -moz-appearance: auto;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail > input[type="number"]::-webkit-outer-spin-button,
.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail > input[type="number"]::-webkit-inner-spin-button,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail > input[type="number"]::-webkit-outer-spin-button,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail > input[type="number"]::-webkit-inner-spin-button {
  /* Keep the native spinner close to the visible suffix text rather than a full-width panel. */
  margin-right: calc(var(--sc-suffix-visible-width) + var(--sc-suffix-slot-right) + var(--sc-spinner-gap));
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail .vareoncalc-input-suffix,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail .vareoncalc-input-suffix {
  top: 0;
  right: var(--sc-suffix-slot-right);
  bottom: 0;
  height: 100%;
  min-height: 100%;
  margin: 0;
  transform: translateY(var(--sc-suffix-center-nudge));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  width: max-content;
  min-width: var(--sc-suffix-rail-min-width);
  max-width: var(--sc-suffix-rail-width);
  padding: 0 var(--sc-suffix-rail-padding-inline) 0 3px;
  border: 0;
  border-left: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--sc-muted-text, #4b5563);
  font-size: clamp(10px, 0.72rem, 11px);
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: right;
  opacity: 0.82;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-symbol .vareoncalc-input-suffix,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-symbol .vareoncalc-input-suffix {
  padding: 0 var(--sc-suffix-rail-padding-inline) 0 1px;
  font-size: clamp(11px, 0.78rem, 12px);
  letter-spacing: 0;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-unit .vareoncalc-input-suffix,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-unit .vareoncalc-input-suffix {
  padding: 0 var(--sc-suffix-rail-padding-inline) 0 4px;
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail:has(.vareoncalc-stepper) > .vareoncalc-input-suffix,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail:has(.vareoncalc-stepper) > .vareoncalc-input-suffix {
  right: calc(var(--sc-stepper-zone-width) + var(--sc-stepper-gap) + 4px);
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail .vareoncalc-stepper > input[type="number"],
.vareoncalc-input-adorned.vareoncalc-loan-input-rail .vareoncalc-stepper > input[type="number"] {
  margin-bottom: 0;
  padding-right: calc(var(--sc-suffix-rail-width) + var(--sc-stepper-zone-width) + var(--sc-stepper-gap) + var(--sc-suffix-text-gap));
}

.vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail .vareoncalc-stepper__buttons,
.vareoncalc-input-adorned.vareoncalc-loan-input-rail .vareoncalc-stepper__buttons {
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.vareoncalc-root.theme-dark .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail .vareoncalc-input-suffix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail .vareoncalc-input-suffix,
.vareoncalc-root.theme-dark .vareoncalc-input-adorned.vareoncalc-loan-input-rail .vareoncalc-input-suffix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-input-adorned.vareoncalc-loan-input-rail .vareoncalc-input-suffix {
  background: transparent;
  border-left-color: transparent;
  color: rgba(226, 232, 240, 0.78);
  opacity: 0.88;
}

.vareoncalc-label-mobile-suffix {
  display: none;
  margin-left: 0.2em;
  color: var(--sc-muted-text, #6b7280);
  font-size: 0.92em;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.82;
  white-space: nowrap;
}

.vareoncalc-root.theme-dark .vareoncalc-label-mobile-suffix,
.vareoncalc-root[data-theme="dark"] .vareoncalc-label-mobile-suffix {
  color: rgba(226, 232, 240, 0.78);
  opacity: 0.88;
}

.vareoncalc-mobile-shift-label {
  display: none;
  margin-bottom: 8px;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

@media (max-width: 480px) {
  .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail,
  .vareoncalc-input-adorned.vareoncalc-loan-input-rail {
    --sc-suffix-rail-min-width: 16px;
    --sc-suffix-rail-max-width: 38px;
    --sc-suffix-rail-fluid-width: 24%;
    --sc-suffix-rail-padding-inline: clamp(1px, 0.6vw, 4px);
    --sc-suffix-slot-right: 6px;
    --sc-suffix-visible-width: 14px;
    --sc-suffix-center-nudge: -0.5px;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-symbol,
  .vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-symbol {
    --sc-suffix-rail-min-width: 12px;
    --sc-suffix-rail-max-width: 24px;
    --sc-suffix-rail-fluid-width: 14%;
    --sc-suffix-visible-width: 9px;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-currency,
  .vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-currency {
    --sc-suffix-rail-min-width: 16px;
    --sc-suffix-rail-max-width: 42px;
    --sc-suffix-rail-fluid-width: 22%;
    --sc-suffix-visible-width: 12px;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--suffix-unit,
  .vareoncalc-input-adorned.vareoncalc-loan-input-rail.vareoncalc-input-adorned--suffix-unit {
    --sc-suffix-rail-min-width: 20px;
    --sc-suffix-rail-max-width: 50px;
    --sc-suffix-rail-fluid-width: 34%;
    --sc-suffix-visible-width: 20px;
  }
}

@media (max-width: 410px) {
  .vareoncalc-label-mobile-suffix {
    display: inline;
  }

  .vareoncalc-mobile-shift-label {
    display: block;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail {
    --sc-suffix-rail-min-width: 0px;
    --sc-suffix-rail-max-width: 0px;
    --sc-suffix-rail-fluid-width: 0px;
    --sc-suffix-rail-padding-inline: 0px;
    --sc-suffix-slot-right: 0px;
    --sc-suffix-text-gap: 0px;
    --sc-suffix-visible-width: 0px;
    --sc-suffix-center-nudge: 0px;
    --sc-spinner-gap: 0px;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail > input,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail > select,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--short > input,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail.vareoncalc-input-adorned--short > select,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail > input,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail > select,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail.vareoncalc-input-adorned--short > input,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail.vareoncalc-input-adorned--short > select {
    padding-right: 14px;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail > input[type="number"]::-webkit-outer-spin-button,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail > input[type="number"]::-webkit-inner-spin-button,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail > input[type="number"]::-webkit-outer-spin-button,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail > input[type="number"]::-webkit-inner-spin-button {
    margin-right: 0;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail .vareoncalc-input-suffix,
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail .vareoncalc-input-suffix {
    display: none;
  }

  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-input-adorned--suffix-rail .vareoncalc-stepper > input[type="number"],
  .vareoncalc-input-adorned.vareoncalc-input-adorned--mobile-label-shift.vareoncalc-loan-input-rail .vareoncalc-stepper > input[type="number"] {
    padding-right: calc(var(--sc-stepper-zone-width) + var(--sc-stepper-gap) + 8px);
  }
}

/* Dark theme adjustments - inherit input text color, no backgrounds */
.vareoncalc-root.theme-dark .vareoncalc-stepper__btn,
.vareoncalc-root[data-theme="dark"] .vareoncalc-stepper__btn {
  color: #ffffff !important;
}

.vareoncalc-root.theme-dark .vareoncalc-stepper__btn:hover,
.vareoncalc-root[data-theme="dark"] .vareoncalc-stepper__btn:hover,
.vareoncalc-root.theme-dark .vareoncalc-stepper__btn:active,
.vareoncalc-root[data-theme="dark"] .vareoncalc-stepper__btn:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  color: #ffffff !important;
}

/* Disabled state */
.vareoncalc-stepper>input[type="number"]:disabled~.vareoncalc-stepper__buttons .vareoncalc-stepper__btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Read-only state */
.vareoncalc-stepper>input[type="number"]:read-only~.vareoncalc-stepper__buttons .vareoncalc-stepper__btn {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Stepper compat with input style variants ──────────────────────────────── */

/* Underlined: flatten stepper buttons to match bottom-border-only aesthetic */
.vareoncalc-input-underlined .vareoncalc-stepper__buttons {
  border-radius: 0;
}

/* Filled: top-only radius on stepper wrapper */
.vareoncalc-input-filled .vareoncalc-stepper {
  border-radius: 8px 8px 0 0;
}

/* Outlined: match the 2px border context */
.vareoncalc-input-outlined .vareoncalc-stepper > input[type="number"] {
  border-width: 2px;
}

/* ══════════════════════════════════════════════════════════════════════════════
   INPUT STYLE VARIANTS
   Applied via root-level class by vareoncalc-loader.js (e.g. .vareoncalc-input-standard).
   Each variant overrides the base input look defined above.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Standard ─ subtle shadow lift, accent border + ring on focus ──────────── */

.vareoncalc-input-standard .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vareoncalc-input-standard .vareoncalc-card select,
.vareoncalc-input-standard .vareoncalc-card textarea {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.vareoncalc-input-standard .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
.vareoncalc-input-standard .vareoncalc-card select:hover,
.vareoncalc-input-standard .vareoncalc-card textarea:hover {
  border-color: var(--sc-accent);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.vareoncalc-input-standard .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.vareoncalc-input-standard .vareoncalc-card select:focus,
.vareoncalc-input-standard .vareoncalc-card textarea:focus {
  border-color: var(--sc-accent);
  box-shadow: var(--sc-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.15));
}

/* ── Filled ─ tinted bg, no border at rest, bottom accent on focus ─────────── */

.vareoncalc-input-filled .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vareoncalc-input-filled .vareoncalc-card select,
.vareoncalc-input-filled .vareoncalc-card textarea {
  background: color-mix(in srgb, var(--sc-input-bg) 85%, var(--sc-input-border) 15%);
  border-color: transparent;
  border-bottom-color: var(--sc-input-border);
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

.vareoncalc-input-filled .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
.vareoncalc-input-filled .vareoncalc-card select:hover,
.vareoncalc-input-filled .vareoncalc-card textarea:hover {
  background: color-mix(in srgb, var(--sc-input-bg) 75%, var(--sc-input-border) 25%);
  border-bottom-color: var(--sc-accent);
}

.vareoncalc-input-filled .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.vareoncalc-input-filled .vareoncalc-card select:focus,
.vareoncalc-input-filled .vareoncalc-card textarea:focus {
  background: color-mix(in srgb, var(--sc-input-bg) 75%, var(--sc-input-border) 25%);
  border-color: transparent;
  border-bottom: 2px solid var(--sc-accent);
  box-shadow: none;
}

/* Filled selects keep their own bg */
.vareoncalc-input-filled .vareoncalc-card select {
  background-color: color-mix(in srgb, var(--sc-select-bg, var(--sc-input-bg)) 85%, var(--sc-input-border) 15%);
}

/* ── Outlined ─ prominent border, transparent bg, wider ring on focus ──────── */

.vareoncalc-input-outlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vareoncalc-input-outlined .vareoncalc-card select,
.vareoncalc-input-outlined .vareoncalc-card textarea {
  background: transparent;
  border: 2px solid var(--sc-input-border);
  box-shadow: none;
}

.vareoncalc-input-outlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
.vareoncalc-input-outlined .vareoncalc-card select:hover,
.vareoncalc-input-outlined .vareoncalc-card textarea:hover {
  border-color: var(--sc-accent);
}

.vareoncalc-input-outlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.vareoncalc-input-outlined .vareoncalc-card select:focus,
.vareoncalc-input-outlined .vareoncalc-card textarea:focus {
  border-color: var(--sc-accent);
  box-shadow: var(--sc-focus-shadow, 0 0 0 3px rgba(59, 130, 246, 0.15)), 0 0 0 1px var(--sc-accent);
}

/* ── Underlined ─ bottom border only, flat look, animated thickness on focus ─ */

.vareoncalc-input-underlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.vareoncalc-input-underlined .vareoncalc-card select,
.vareoncalc-input-underlined .vareoncalc-card textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sc-input-border);
  border-radius: 0;
  padding-left: 2px;
  padding-right: 2px;
  box-shadow: none;
}

.vareoncalc-input-underlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):hover,
.vareoncalc-input-underlined .vareoncalc-card select:hover,
.vareoncalc-input-underlined .vareoncalc-card textarea:hover {
  border-bottom-color: var(--sc-accent);
}

.vareoncalc-input-underlined .vareoncalc-card input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.vareoncalc-input-underlined .vareoncalc-card select:focus,
.vareoncalc-input-underlined .vareoncalc-card textarea:focus {
  border-bottom: 2px solid var(--sc-accent);
  box-shadow: none;
}

/* Underlined adorned wrapper radius override */
.vareoncalc-input-underlined .vareoncalc-input-adorned {
  border-radius: 0;
}

/* Ensure prefix padding wins after input style variants */
.vareoncalc-input-adorned.vareoncalc-input-adorned--has-prefix > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--has-prefix > select,
.vareoncalc-input-adorned.vareoncalc-input-adorned--prefix > input,
.vareoncalc-input-adorned.vareoncalc-input-adorned--prefix > select {
  padding-left: calc(var(--prefix-width, 12px) + 22px);
}

/* ══════════════════════════════════════════════════════════════════════════════
   GUTENBERG EDITOR ISOLATION
   Ensure calculator preview renders correctly within WordPress block editor.
   These rules override editor/admin styles that might conflict with calculator theming.
   ══════════════════════════════════════════════════════════════════════════════ */

/* Editor block wrapper - inherit colors from calculator root */
.vareoncalc-block-editor .vareoncalc-root,
.vareoncalc-block-editor .vareoncalc-root * {
  color: inherit;
}

/* Force calculator backgrounds and borders in editor */
.vareoncalc-block-editor .vareoncalc-root {
  background: var(--sc-card-bg, var(--vareoncalc-card-bg, #fff));
  color: var(--sc-card-text, var(--vareoncalc-card-text, #111827));
}

.vareoncalc-block-editor .vareoncalc-card {
  background: var(--sc-card-bg, var(--vareoncalc-card-bg, #fff));
  color: var(--sc-card-text, var(--vareoncalc-card-text, #111827));
  border-color: var(--sc-card-border, var(--vareoncalc-card-border, #e5e7eb));
}

/* Editor form controls - use calculator variables */
.vareoncalc-block-editor .vareoncalc-root input,
.vareoncalc-block-editor .vareoncalc-root select,
.vareoncalc-block-editor .vareoncalc-root textarea {
  background: var(--sc-input-bg, var(--vareoncalc-input-bg, #f9fafb));
  border-color: var(--sc-input-border, var(--vareoncalc-input-border, #d1d5db));
  color: var(--sc-input-text, var(--vareoncalc-input-text, #111827));
}

.vareoncalc-block-editor .vareoncalc-root select {
  background: var(--sc-select-bg, var(--vareoncalc-select-bg, var(--sc-input-bg, #f9fafb)));
}

/* Editor labels */
.vareoncalc-block-editor .vareoncalc-root label {
  color: var(--sc-label-text, var(--sc-card-text, var(--vareoncalc-card-text, #111827)));
}

/* Editor buttons */
.vareoncalc-block-editor .vareoncalc-root .vareoncalc-btn {
  background: var(--sc-button-bg, var(--vareoncalc-button-bg, #3b82f6));
  color: var(--sc-button-text, var(--vareoncalc-button-text, #fff));
}

.vareoncalc-block-editor .vareoncalc-root .vareoncalc-btn:hover {
  background: var(--sc-button-hover, var(--vareoncalc-button-hover, #2563eb));
}

/* Editor info/result panels */
.vareoncalc-block-editor .vareoncalc-root .vareoncalc-out,
.vareoncalc-block-editor .vareoncalc-root .vareoncalc-info,
.vareoncalc-block-editor .vareoncalc-root .vareoncalc-panel {
  background: var(--sc-panel-bg, var(--vareoncalc-info-bg, #eff6ff));
  color: var(--sc-panel-text, var(--vareoncalc-info-text, #1e3a8a));
  border-color: var(--sc-panel-border, var(--vareoncalc-info-border-left, #bfdbfe));
}

/* Reset WordPress admin input heights and widths in editor preview */
.vareoncalc-block-editor .vareoncalc-root input[type="number"],
.vareoncalc-block-editor .vareoncalc-root input[type="text"],
.vareoncalc-block-editor .vareoncalc-root select {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 48px;
  box-sizing: border-box;
}

/* Editor variant overrides — prevent WP admin styles from clobbering variants */

/* Filled variant in editor */
.vareoncalc-block-editor .vareoncalc-input-filled .vareoncalc-card input,
.vareoncalc-block-editor .vareoncalc-input-filled .vareoncalc-card select {
  border-color: transparent;
  border-bottom-color: var(--sc-input-border, #d1d5db);
  border-radius: 8px 8px 0 0;
}

/* Outlined variant in editor */
.vareoncalc-block-editor .vareoncalc-input-outlined .vareoncalc-card input,
.vareoncalc-block-editor .vareoncalc-input-outlined .vareoncalc-card select {
  background: transparent;
  border-width: 2px;
}

/* Underlined variant in editor */
.vareoncalc-block-editor .vareoncalc-input-underlined .vareoncalc-card input,
.vareoncalc-block-editor .vareoncalc-input-underlined .vareoncalc-card select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--sc-input-border, #d1d5db);
  border-radius: 0;
}

/* Pro block editor live preview shell */
.vareoncalc-block-editor.vareoncalc-editor-live-preview {
  margin: 12px 0;
  padding-bottom: 14px;
  box-sizing: border-box;
  display: flow-root;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-header {
  padding: 8px 0;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-header__title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-header__logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-header__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="light"] .vareoncalc-editor-header__label {
  color: #374151;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="dark"] .vareoncalc-editor-header__label {
  color: #cbd5e1;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-meta {
  font-size: 12px;
  color: #3b82f6;
  font-weight: 500;
  flex: 0 0 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell {
  position: relative;
  margin-top: 8px;
  border: 0;
  border-radius: 0;
  padding: 0 0 16px;
  background: transparent;
  display: flow-root;
  overflow: visible;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell-empty {
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-empty-state {
  text-align: center;
  max-width: 420px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-empty-icon,
.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-empty-logo {
  width: 44px;
  height: 44px;
  margin: 0 auto 14px;
  object-fit: contain;
  display: block;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-empty-title {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 18px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-empty-description {
  margin: 0 0 16px 0;
  color: #64748b;
  font-size: 14px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-host {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  z-index: 0;
  display: block;
  overflow: visible;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell-safe .vareoncalc-editor-preview-host,
.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell-safe .vareoncalc-editor-preview-host * {
  pointer-events: none !important;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell-interactive .vareoncalc-editor-preview-host,
.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-shell-interactive .vareoncalc-editor-preview-host * {
  pointer-events: auto !important;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-select-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: transparent;
  border-radius: inherit;
  pointer-events: auto;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-feedback {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  border-radius: inherit;
  padding: 16px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-feedback-loading {
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
  font-size: 13px;
  font-weight: 500;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-feedback-error {
  background: rgba(255, 255, 255, 0.95);
  color: #dc2626;
  flex-direction: column;
  gap: 12px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-error-message {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-error-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.vareoncalc-editor-width-popover {
  width: 250px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vareoncalc-editor-width-popover-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.vareoncalc-editor-width-preset-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-width-warning {
  margin: 0 0 8px 0;
  padding: 8px 10px;
  border: 1px solid #facc15;
  border-radius: 8px;
  background: #fef9c3;
  color: #854d0e;
  font-size: 12px;
  font-weight: 500;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview .vareoncalc-editor-preview-diagnostic {
  margin-top: 8px;
  padding: 7px 10px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fff1f2;
  color: #9f1239;
  font-size: 12px;
  font-weight: 500;
}

/* Light / dark canvas: editor chrome only (block live preview) */
.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="light"] .vareoncalc-editor-empty-title {
  color: #1f2937;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="light"] .vareoncalc-editor-empty-description {
  color: #64748b;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="light"] .vareoncalc-editor-preview-shell-empty {
  border-color: #d1d5db;
  background: #f8fafc;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="light"] .vareoncalc-editor-preview-feedback-loading {
  background: rgba(255, 255, 255, 0.9);
  color: #475569;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="dark"] .vareoncalc-editor-empty-title {
  color: #e2e8f0;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="dark"] .vareoncalc-editor-empty-description {
  color: #94a3b8;
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="dark"] .vareoncalc-editor-preview-shell-empty {
  border-color: #475569;
  background: rgba(255, 255, 255, 0.04);
}

.vareoncalc-block-editor.vareoncalc-editor-live-preview[data-editor-surface="dark"] .vareoncalc-editor-preview-feedback-loading {
  background: rgba(0, 0, 0, 0.7);
  color: #cbd5e1;
}

/* Pro editor calculator picker modal */
.vareoncalc-editor-picker-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: min(66vh, 620px);
  max-height: min(66vh, 620px);
  overflow: hidden;
}

.components-modal__frame.vareoncalc-editor-picker-dialog {
  max-height: min(86vh, 820px);
}

.components-modal__frame.vareoncalc-editor-picker-dialog .components-modal__content {
  overflow: hidden;
  padding-top: 14px;
  padding-bottom: 14px;
}

.vareoncalc-editor-picker-topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vareoncalc-editor-picker-search-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: min(360px, 100%);
  max-width: 100%;
}

.vareoncalc-editor-picker-search-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.vareoncalc-editor-picker-search {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 13px;
  line-height: 1.3;
}

.vareoncalc-editor-picker-search:focus,
.vareoncalc-editor-picker-theme-select:focus,
.vareoncalc-editor-picker-category-chip:focus,
.vareoncalc-editor-picker-card:focus,
.vareoncalc-editor-picker-categories-toggle:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.vareoncalc-editor-picker-categories-toggle {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.vareoncalc-editor-picker-categories-toggle:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}

.vareoncalc-editor-picker-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.vareoncalc-editor-picker-result-count {
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}

.vareoncalc-editor-picker-categories-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 0.24s ease, opacity 0.2s ease, transform 0.24s ease;
}

.vareoncalc-editor-picker-categories-panel.is-open {
  max-height: 160px;
  opacity: 1;
  transform: translateY(0);
}

.vareoncalc-editor-picker-categories-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 2px;
}

.vareoncalc-editor-picker-category-chip {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vareoncalc-editor-picker-category-chip:hover {
  border-color: #93c5fd;
  background: #eff6ff;
}

.vareoncalc-editor-picker-category-chip.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1e40af;
  font-weight: 600;
}

.vareoncalc-editor-picker-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.vareoncalc-editor-picker-grid-shell {
  height: 100%;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.vareoncalc-editor-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.vareoncalc-editor-picker-card {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 14px 10px;
  background: #ffffff;
  text-align: center;
  cursor: pointer;
  min-height: 94px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.vareoncalc-editor-picker-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.vareoncalc-editor-picker-card.is-selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 1px #2563eb;
}

.vareoncalc-editor-picker-card-icon {
  font-size: 24px;
  margin-bottom: 6px;
}

.vareoncalc-editor-picker-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
}

.vareoncalc-editor-picker-card.is-selected .vareoncalc-editor-picker-card-title {
  color: #1d4ed8;
  font-weight: 700;
}

.vareoncalc-editor-picker-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  color: #64748b;
  text-align: center;
  padding: 20px;
}

.vareoncalc-editor-picker-empty-icon {
  font-size: 32px;
  margin-bottom: 10px;
}

.vareoncalc-editor-picker-empty-title {
  margin-bottom: 6px;
}

.vareoncalc-editor-picker-footer {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
  flex-wrap: wrap;
}

.vareoncalc-editor-picker-theme-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 260px;
  flex-grow: 1;
}

.vareoncalc-editor-picker-theme-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.vareoncalc-editor-picker-theme-select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 13px;
  background: #ffffff;
}

.vareoncalc-editor-picker-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 782px) {
  .vareoncalc-editor-picker-modal {
    height: min(62vh, 560px);
    max-height: min(62vh, 560px);
  }

  .vareoncalc-editor-picker-search-wrap {
    width: 100%;
  }

  .vareoncalc-editor-picker-categories-toggle {
    width: 100%;
  }
}

/* Editor live preview compact mode is applied on the shadow host when the
   preview is narrow or real overflow is detected. Keep it fully editor-only. */
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-control-panel {
  grid-template-columns: 1fr;
  gap: 16px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-root {
  --sc-suffix-rail-min-width: 16px;
  --sc-suffix-rail-max-width: 38px;
  --sc-suffix-rail-fluid-width: 24%;
  --sc-suffix-slot-right: 6px;
  --sc-suffix-visible-width: 14px;
  --sc-suffix-center-nudge: -0.5px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-card {
  --sc-card-padding: 16px;
  padding: 16px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-two-step,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-two-step__step,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-two-step__results,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-two-step__inputs-body,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-panel-input,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__body,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__results {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-root :where(input, select, textarea, button) {
  min-width: 0;
  max-width: 100%;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-root :where(
  .vareoncalc-field--narrow,
  .vareoncalc-target-group__label,
  .vareoncalc-term-units,
  .vareoncalc-toggle,
  .vareoncalc-measurement-toggle,
  .vareoncalc-measurement-toggle:not(.vareoncalc-toggle),
  .vareoncalc-btn
) {
  min-width: 0 !important;
  max-width: 100%;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row {
  flex-direction: column;
  gap: 12px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row > .vareoncalc-field--narrow {
  width: 100%;
  max-width: none;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row--thirds {
  grid-template-columns: 1fr;
  gap: 12px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row--quads {
  flex-wrap: wrap;
  gap: 10px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row--quads > .vareoncalc-field {
  flex: 1 1 calc(50% - 5px);
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-disclosure__header,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-target-group__controls,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav-left,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav-right {
  flex-wrap: wrap;
  min-width: 0;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-target-group__controls {
  align-items: stretch;
  flex-wrap: wrap;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-target-input__field {
  width: 100%;
  min-width: 0;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle-wrapper {
  justify-content: flex-start;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-toggle,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle .vareoncalc-toggle__track,
:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle:not(.vareoncalc-toggle) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-measurement-toggle__btn {
  min-width: 0;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-two-step__blind-handle {
  height: auto;
  min-height: var(--sc-two-step-handle-height);
  padding: 10px 12px;
  white-space: normal;
  text-align: center;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard {
  gap: 16px;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__header {
  width: 100%;
  max-width: 100%;
  margin: 0 0 12px;
  padding: 14px var(--sc-card-padding, 16px);
  border-top-left-radius: var(--sc-wizard-header-radius);
  border-top-right-radius: var(--sc-wizard-header-radius);
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-left {
  margin-right: auto;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-center {
  display: none !important;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav.vareoncalc-wizard__nav--branded .vareoncalc-wizard__nav-right {
  justify-content: flex-end;
}

:host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__nav .vareoncalc-btn {
  width: auto;
  flex: 0 1 auto;
  max-width: 100%;
}

@container vareoncalc (max-width: 520px) {
  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row--quads {
    flex-direction: column;
    gap: 12px;
  }

  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-field-row--quads > .vareoncalc-field {
    flex-basis: 100%;
  }
}

@container vareoncalc (max-width: 420px) {
  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-card {
    --sc-card-padding: 14px;
    padding: 14px;
  }

  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-btn {
    padding: 12px 14px;
    font-size: 15px;
  }

  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__track-step {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 12px;
  }

  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step {
    margin-left: 20px;
  }

  :host(.vareoncalc-editor-preview-shadow-host.is-compact-preview) .vareoncalc-wizard__track-step + .vareoncalc-wizard__track-step::before {
    width: 16px;
  }
}

@media (max-width: 410px) {
  .vareoncalc-card.layout-wide .vareoncalc-form-grid {
    gap: 12px;
  }

  .vareoncalc-control-panel {
    gap: 14px;
  }

  .vareoncalc-panel-input {
    gap: 12px;
  }

  .vareoncalc-field-row,
  .vareoncalc-field-row--thirds,
  .vareoncalc-field-row--quads {
    gap: 10px;
  }
}

@media (max-width: 360px) {
  .vareoncalc-field-row,
  .vareoncalc-field-row--thirds,
  .vareoncalc-field-row--quads {
    gap: 8px;
  }

  .vareoncalc-field-row--quads > .vareoncalc-field {
    flex-basis: 100%;
  }

  .vareoncalc-panel-result--placeholder {
    padding: var(--sc-card-padding);
  }
}

@container vareoncalc (max-width: 410px) {
  .vareoncalc-card.layout-wide .vareoncalc-form-grid {
    gap: 12px;
  }

  .vareoncalc-control-panel {
    gap: 14px;
  }

  .vareoncalc-panel-input {
    gap: 12px;
  }

  .vareoncalc-field-row,
  .vareoncalc-field-row--thirds,
  .vareoncalc-field-row--quads {
    gap: 10px;
  }
}

@container vareoncalc (max-width: 360px) {
  .vareoncalc-field-row,
  .vareoncalc-field-row--thirds,
  .vareoncalc-field-row--quads {
    gap: 8px;
  }

  .vareoncalc-field-row--quads > .vareoncalc-field {
    flex-basis: 100%;
  }

  .vareoncalc-panel-result--placeholder {
    padding: var(--sc-card-padding);
  }
}
