/**
 * AmeraLabs Profit Calculator — Frontend CSS
 * BEM naming: amera-roi-form__block__element--modifier
 * CSS variables: --arf-* on :root (modal lives outside #amera-calc)
 * Calculator rules scoped under #amera-calc; modal/overlay are fixed-position exceptions.
 */

/* ═══════════════════════════════════════════════════════
   DESIGN TOKENS  (on :root so modal & overlay inherit them)
══════════════════════════════════════════════════════════ */
:root {
  /* Brand palette */
  --arf-brand:         #1E3A5F;
  --arf-brand-dark:    #162e4d;
  --arf-brand-mid:     #2E5C8A;
  --arf-tab-blue:      #274C97;
  --arf-tab-blue-dark: #1e3d80;
  --arf-text-dark:     #182230;
  --arf-text-muted:    #9E9E9E;
  --arf-text-body:     #363636;
  --arf-accent:        #4A90B5;
  --arf-orange:        #F16623;
  --arf-orange-dark:   #d4581e;
  --arf-green:         #1E9E75;
  --arf-bg:            #EEF1F6;

  /* Neutrals */
  --arf-white:         #ffffff;
  --arf-gray-50:       #EFF0F7;
  --arf-gray-100:      #f5f5f5;
  --arf-computed-bg:   #EFF0F7;
  --arf-gray-200:      #e9ecef;
  --arf-gray-300:      #dee2e6;
  --arf-gray-400:      #D0D5DD;
  --arf-gray-500:      #adb5bd;
  --arf-gray-600:      #666;
  --arf-gray-700:      #555;
  --arf-gray-900:      #182230;

  /* Error */
  --arf-error:         #e53e3e;

  /* Typography */
  --arf-text-xs:       11px;
  --arf-text-sm:       13px;
  --arf-text-base:     15px;
  --arf-text-lg:       16px;
  --arf-text-xl:       18px;
  --arf-text-2xl:      28px;
  --arf-line:          1.6;

  /* Spacing */
  --arf-space-1:       4px;
  --arf-space-2:       8px;
  --arf-space-3:       12px;
  --arf-space-4:       16px;
  --arf-space-5:       20px;
  --arf-space-6:       24px;
  --arf-space-8:       32px;

  /* Shape */
  --arf-radius:        8px;
  --arf-radius-lg:     12px;
  --arf-radius-xl:     16px;
  --arf-radius-pill:   999px;

  /* Borders */
  --arf-border:        1px solid var(--arf-gray-400);
  --arf-border-focus:  1px solid var(--arf-orange);
  --arf-focus-ring:    0 0 0 3px rgba(232, 100, 10, .15);

  /* Shadows */
  --arf-shadow:        0 1px 3px rgba(0, 0, 0, .10);
  --arf-shadow-lg:     0 8px 24px rgba(0, 0, 0, .12);

  /* Transitions */
  --arf-transition:    .15s ease;
}

#amera-calc {
  font-family: inherit;
  color: var(--arf-gray-900);
}


/* ═══════════════════════════════════════════════════════
   CURRENCY SYMBOL  (CSS-driven, zero JS)
══════════════════════════════════════════════════════════ */
#amera-calc[data-currency="EUR"] .amera-roi-form__cur::after { content: "(€)"; }
#amera-calc[data-currency="USD"] .amera-roi-form__cur::after { content: "($)"; }
#amera-calc[data-currency="EUR"] .amera-roi-form__cur[data-unit="/h"]::after     { content: "(€/h)"; }
#amera-calc[data-currency="USD"] .amera-roi-form__cur[data-unit="/h"]::after     { content: "($/h)"; }
#amera-calc[data-currency="EUR"] .amera-roi-form__cur[data-unit="/kg"]::after    { content: "(€/kg)"; }
#amera-calc[data-currency="USD"] .amera-roi-form__cur[data-unit="/kg"]::after    { content: "($/kg)"; }
#amera-calc[data-currency="EUR"] .amera-roi-form__cur[data-unit="/month"]::after { content: "(€/month)"; }
#amera-calc[data-currency="USD"] .amera-roi-form__cur[data-unit="/month"]::after { content: "($/month)"; }
.amera-roi-form__cur { font-style: normal; white-space: nowrap; }


/* ═══════════════════════════════════════════════════════
   HIDDEN ATTRIBUTE SAFEGUARD
   Prevents step panels flashing visible before JS runs.
   Browsers honour [hidden] natively but some themes/reset
   CSS override it — this makes it explicit.
══════════════════════════════════════════════════════════ */
.amera-roi-form__step-panel[hidden] { display: none !important; }

/* ═══════════════════════════════════════════════════════
   CURRENCY SELECT (step 2)
══════════════════════════════════════════════════════════ */
.amera-roi-form__field--currency { grid-column: 1 / -1; }

.amera-roi-form__currency-select {
  width: 100%;
  height: 38px;
  padding: 0 36px 0 12px;
  border: var(--arf-border);
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-base);
  color: var(--arf-gray-900);
  background: var(--arf-white);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E3A5F' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  outline: none;
  transition: border-color var(--arf-transition);
  box-sizing: border-box;
}

.amera-roi-form__currency-select:focus {
  border: var(--arf-border-focus);
  box-shadow: var(--arf-focus-ring);
}


/* ═══════════════════════════════════════════════════════
   FULL-WIDTH HEADER (intro + tabs + progress)
══════════════════════════════════════════════════════════ */
.amera-roi-form__header {
  width: 100%;
  margin-bottom: var(--arf-space-5);
}

/* ═══════════════════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════════════════════ */
#amera-calc {
  padding: 3rem;
  background: #F5F7FD;
  border-radius: var(--arf-radius);
}

@media (max-width: 600px) {
	#amera-calc {
	  padding: 2rem 1rem;
	}	
}

.amera-roi-form__layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  align-items: start;
}

.amera-roi-form__col--form  { min-width: 0; }

.amera-roi-form__col--chart {
  position: sticky;
  top: 130px;
}

@media (max-width: 900px) {
  .amera-roi-form__layout { grid-template-columns: 1fr; }
  .amera-roi-form__col--chart { position: static; }
}


/* ═══════════════════════════════════════════════════════
   INTRO
══════════════════════════════════════════════════════════ */
.amera-roi-form__intro__title {
  font-size: var(--arf-text-xl);
  font-weight: 700;
  margin: 0 0 var(--arf-space-3);
  color: var(--arf-brand);
}

#amera-calc p {
  font-size: var(--arf-text-base);
  line-height: var(--arf-line);
  margin-block: 0 1.2em;
}

.amera-roi-form__intro__fill {
  margin-top: var(--arf-space-4);
  font-size: var(--arf-text-base);
}


/* ═══════════════════════════════════════════════════════
   STEP NAV TABS
══════════════════════════════════════════════════════════ */
#apc-steps-nav {
  margin-bottom: var(--arf-space-1);
}

.amera-roi-form__steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--arf-space-1);
  margin-bottom: var(--arf-space-1);
}

.amera-roi-form__step-tab {
  padding: 10px 5px;
  border: var(--arf-border);
  border-radius: var(--arf-radius);
  background: var(--arf-tab-blue);
  cursor: pointer;
  font-size: var(--arf-text-base);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: #ffffff;
  transition: background var(--arf-transition), color var(--arf-transition);
}

@media (max-width: 767px) {
  .amera-roi-form__steps {
    grid-template-columns: repeat(12, minmax(115px, 1fr));
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%);
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 60px), transparent 100%);
  }

  .amera-roi-form__steps::-webkit-scrollbar { display: none; }

  .amera-roi-form__step-tab {
    scroll-snap-align: start;
    padding: 6px!important;
  }
  
  .amera-roi-form__step-tab {
    font-size: 1.3rem!important;
  }
}


.amera-roi-form__step-tab.current {
  background: #ffffff;
  border-color: var(--arf-gray-400);
  color: #182230;
}

.amera-roi-form__step-tab:hover:not(.current) {
  background: var(--arf-tab-blue-dark);
}

.amera-roi-form__step-tab__subtitle {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}


/* ═══════════════════════════════════════════════════════
   PROGRESS BAR
══════════════════════════════════════════════════════════ */
.amera-roi-form__progress {
  height: 8px;
  background: #E5E7EB;
  border-radius: 100vw;
  margin: var(--arf-space-2) 0 var(--arf-space-6);
  overflow: hidden;
  margin: 3rem 0;
}

.amera-roi-form__progress-bar {
  height: 100%;
  background: var(--arf-tab-blue);
  border-radius: 100vw;
  transition: width .3s ease;
}


/* ═══════════════════════════════════════════════════════
   STEP HEADING & DESCRIPTION
══════════════════════════════════════════════════════════ */
.amera-roi-form__step-heading {
  font-size: var(--arf-text-base);
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--arf-text-body);
  margin: 0 0 var(--arf-space-4);
  padding-bottom: var(--arf-space-2);
  border-bottom: 1px solid var(--arf-gray-400);
}

.amera-roi-form__step-desc {
  font-size: var(--arf-text-sm);
  margin-bottom: var(--arf-space-4);
  line-height: var(--arf-line);
  margin: 0 0 var(--arf-space-4);
  padding-bottom: var(--arf-space-3);
  border-bottom: 1px solid var(--arf-gray-400);
}


/* ═══════════════════════════════════════════════════════
   FIELD GRID
══════════════════════════════════════════════════════════ */
.amera-roi-form__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--arf-space-6);
}

@media (max-width: 600px) {
  .amera-roi-form__fields { grid-template-columns: 1fr; }
}

.amera-roi-form__field {
  display: flex;
  flex-direction: column;
  gap: var(--arf-space-1);
}

.amera-roi-form__field--new-row { grid-column: 1; }

.amera-roi-form__field--computed input {
  background: var(--arf-computed-bg) !important;
  color: var(--arf-text-body) !important;
}


/* ═══════════════════════════════════════════════════════
   LABELS
══════════════════════════════════════════════════════════ */
#amera-calc label {
  font-size: 13px;
  font-weight: 500;
  color: var(--arf-brand-dark);
  display: block;
}


/* ═══════════════════════════════════════════════════════
   INPUTS
══════════════════════════════════════════════════════════ */
#amera-calc input[type="number"],
#amera-calc input[type="text"],
#amera-calc input[type="email"] {
  width: 100%;
  height: 38px;
  padding: var(--arf-space-2) var(--arf-space-3);
  border: var(--arf-border);
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-base);
  color: var(--arf-gray-900);
  background: var(--arf-white);
  box-sizing: border-box;
  transition: border-color var(--arf-transition);
  outline: none;
}

#amera-calc input:focus {
  border: var(--arf-border-focus);
  box-shadow: var(--arf-focus-ring);
}

#amera-calc input[readonly] {
  background: var(--arf-gray-50);
  color: var(--arf-gray-600);
  cursor: default;
}


/* ═══════════════════════════════════════════════════════
   LOCK FIELD
══════════════════════════════════════════════════════════ */
.amera-roi-form__input-wrapper {
  display: flex;
  align-items: center;
  border: var(--arf-border);
  border-radius: var(--arf-radius);
  background: var(--arf-white);
  transition: border-color var(--arf-transition);
  overflow: hidden;
}

.amera-roi-form__input-wrapper:focus-within {
  border: var(--arf-border-focus);
  box-shadow: var(--arf-focus-ring);
}

.amera-roi-form__input-wrapper input[type="number"],
.amera-roi-form__input-wrapper input[type="text"] {
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  flex: 1;
  min-width: 0;
  padding-left: var(--arf-space-2);
}

.amera-roi-form__input-wrapper input:focus {
  box-shadow: none !important;
}

.amera-roi-form__input-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--arf-space-2) 0 10px;
  color: var(--arf-orange);
  flex-shrink: 0;
  cursor: pointer;
  z-index: 2;
}

.amera-roi-form__input-icon svg {
  width: 20px;
  height: 23px;
  fill: var(--arf-orange);
  display: block;
}

.amera-roi-form__lock-field.is-locked {
  pointer-events: none;
  user-select: none;
}

.amera-roi-form__lock-wrapper {
  position: relative;
  cursor: pointer;
}

.amera-roi-form__lock-tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--arf-text-sm);
  font-weight: 600;
  color: var(--arf-orange);
  background: rgba(255, 255, 255, .6);
  opacity: 0;
  transition: opacity var(--arf-transition);
  pointer-events: none;
  z-index: 3;
  border-radius: var(--arf-radius);
}

.amera-roi-form__lock-wrapper:hover .amera-roi-form__lock-tip { opacity: 1; }

/* ═══════════════════════════════════════════════════════
   HELP ICON & POPOVER
══════════════════════════════════════════════════════════ */
.amera-roi-form__help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  color: #b5b5b5;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  border: 1.5px solid #b5b5b5;
  cursor: help;
  flex-shrink: 0;
  line-height: 1;
}

.amera-roi-form__help-btn:hover {
  border-color: #8a8a8a;
  color: #555;
}

.amera-roi-form__help-popover {
  background: var(--arf-white);
  border: var(--arf-border);
  border-radius: var(--arf-radius-lg);
  padding: var(--arf-space-4);
  max-width: 320px;
  font-size: var(--arf-text-sm);
  color: #444;
  line-height: var(--arf-line);
  box-shadow: var(--arf-shadow-lg);
}

.amera-roi-form__help-close {
  float: right;
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--arf-text-lg);
  color: var(--arf-gray-500);
  line-height: 1;
  padding: 0 0 var(--arf-space-1) var(--arf-space-2);
}


/* ═══════════════════════════════════════════════════════
   NAV BUTTONS
══════════════════════════════════════════════════════════ */
.amera-roi-form__nav-wrap {
  display: flex;
  gap: var(--arf-space-3);
  margin-top: 90px;
}

.amera-roi-form__btn--prev,
.amera-roi-form__btn--next {
  padding: 10px 5px;
  min-width: 160px;
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-base);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--arf-transition);
  border: var(--arf-border);
  background: var(--arf-white);
  color: var(--arf-brand);
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.53);
}
.amera-roi-form__btn, .amera-roi-form__btn--start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 45px;
  gap: 6px;
  text-align: center;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.53);
}

.amera-roi-form__btn-icon {
  width: 20px;
  height: 20px;
  color: currentColor;
}

.amera-roi-form__btn-icon--prev {
  transform: rotate(180deg);
}


.amera-roi-form__btn--next {
  background: var(--arf-orange);
  border-color: var(--arf-orange);
  color: #ffffff;
  margin-left: auto;
}

.amera-roi-form__btn--next:hover { background: var(--arf-orange-dark); }
.amera-roi-form__btn--prev:hover { background: var(--arf-gray-200); }

.amera-roi-form__btn--start {
  width: 100%;
  padding: 14px;
  background: var(--arf-orange);
  color: var(--arf-white);
  border: none;
  border-radius: var(--arf-radius-pill);
  font-size: var(--arf-text-lg);
  font-weight: 700;
  cursor: pointer;
  margin-top: var(--arf-space-5);
  margin-left: auto;
  transition: background var(--arf-transition);
}

.amera-roi-form__btn--start:hover { background: var(--arf-orange-dark); }

@media (max-width: 600px) {
  .amera-roi-form__btn--prev,
  .amera-roi-form__btn--next {
    font-size: 14px;
    min-width: 135px;
  }
  
.amera-roi-form__btn {
    gap: 4px;
  }
}

/* ═══════════════════════════════════════════════════════
   LOCK MODAL
══════════════════════════════════════════════════════════ */

/* Shared: name row grid used in modal */
.amera-roi-form__name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 10px;
}

@media (max-width: 500px) {
  .amera-roi-form__name-row { grid-template-columns: 1fr; }
}

/* Shared: privacy checkbox row */
.amera-roi-form__checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--arf-space-2);
  align-items: flex-start;
  margin: 14px 0 var(--arf-space-1);
}

.amera-roi-form__checkboxes input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--arf-orange);
  width: auto;
  height: auto;
  flex-shrink: 0;
}

.amera-roi-form__checkboxes label {
  font-size: var(--arf-text-sm);
  color: #444;
  line-height: 1.4;
  font-weight: 400;
  flex: 1;
}

.amera-roi-form__checkboxes label a {
  font-weight: 700;
  color: var(--arf-brand);
  text-decoration: underline;
}

.amera-roi-form__checkboxes .amera-roi-form__modal__error-msg {
  flex-basis: 100%;
  margin-top: 0;
}

/* Unlock button inside modal */
.amera-roi-form__btn--unlock {
  width: 100%;
  height: 44px;
  margin-top: var(--arf-space-5);
  background: var(--arf-orange);
  color: var(--arf-white);
  border: none;
  border-radius: var(--arf-radius-pill);
  font-size: var(--arf-text-lg);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--arf-space-2);
  transition: background var(--arf-transition);
}

.amera-roi-form__btn--unlock:hover    { background: var(--arf-orange-dark); }
.amera-roi-form__btn--unlock:disabled { opacity: .7; cursor: not-allowed; }
.amera-roi-form__modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
}

.amera-roi-form__modal-backdrop.is-open    { display: flex; }
.amera-roi-form__modal-backdrop.is-visible { opacity: 1; pointer-events: auto; }

.amera-roi-form__modal-dialog {
  background: var(--arf-bg);
  border-radius: var(--arf-radius-xl);
  padding: 32px 28px 28px;
  max-width: 520px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(16px);
  transition: transform .3s;
}

.amera-roi-form__modal-backdrop.is-visible .amera-roi-form__modal-dialog {
  transform: translateY(0);
}

.amera-roi-form__modal__close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: var(--arf-gray-500);
  padding: 4px 8px;
  line-height: 1;
}

.amera-roi-form__modal__close:hover { color: #333; }

.amera-roi-form__modal__title {
  font-size: var(--arf-text-xl);
  font-weight: 700;
  margin: 0 0 var(--arf-space-5);
  color: var(--arf-gray-900);
  text-align: center;
}

.amera-roi-form__modal__name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 5px;
}

.amera-roi-form__modal__body .amera-roi-form__modal__group { margin-bottom: 14px; }

.amera-roi-form__modal__body .amera-roi-form__modal__group label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--arf-text-sm);
  font-weight: 400;
  color: var(--arf-brand);
}

.amera-roi-form__modal__body input[type="text"],
.amera-roi-form__modal__body input[type="email"] {
  width: 100%;
  height: 38px;
  box-sizing: border-box;
  padding: 10px 14px;
  border: var(--arf-border);
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-sm);
  outline: none;
  transition: border-color var(--arf-transition);
}

.amera-roi-form__modal__body input:focus { border: var(--arf-border-focus); }
.amera-roi-form__modal__body input::placeholder { color: var(--arf-gray-500); }

.amera-roi-form__modal__checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--arf-space-2);
  margin: 18px 0 var(--arf-space-1);
}

.amera-roi-form__modal__checkbox-row input {
  margin-top: 3px;
  accent-color: var(--arf-orange);
  width: auto;
  height: auto;
}

.amera-roi-form__modal__checkbox-row label {
  font-size: var(--arf-text-sm);
  color: #344054;
  line-height: 1.4;
  font-weight: 400;
}

.amera-roi-form__modal__checkbox-row label a {
  font-weight: 700;
  color: var(--arf-gray-900);
  text-decoration: underline;
}

.amera-roi-form__modal__submit {
  margin-top: var(--arf-space-5);
  width: 100%;
  height: 42px;
  padding: 0 var(--arf-space-6);
  background: var(--arf-orange);
  color: var(--arf-white);
  border: none;
  border-radius: var(--arf-radius-pill);
  font-size: var(--arf-text-lg);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--arf-space-2);
  transition: background .2s;
}

.amera-roi-form__modal__submit:hover { background: var(--arf-orange-dark); }
.amera-roi-form__modal__submit svg   { fill: currentColor; }

.amera-roi-form__modal__body input.amera-roi-form__modal__error { border-color: var(--arf-error); }

.amera-roi-form__modal__error-msg {
  display: block;
  color: var(--arf-error);
  font-size: var(--arf-text-xs);
  margin-top: var(--arf-space-1);
  font-weight: 500;
}


/* ═══════════════════════════════════════════════════════
   RESULTS
══════════════════════════════════════════════════════════ */
#apc-results-wrap { background: #fff; padding: 2rem; border-radius: var(--arf-radius); }

@media (max-width: 600px) {
	#apc-results-wrap {
	  padding: 2rem 1rem;
	}	
}

.amera-roi-form__results-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--arf-space-4);
  margin: 0 0 var(--arf-space-6);
  flex-wrap: wrap;
}


@media (max-width: 600px) {
.amera-roi-form__results-title-row {
  flex-direction: column;
}
}
.amera-roi-form__btn {
    gap: 4px;
  }
}

.amera-roi-form__results-title {
  font-size: var(--arf-text-2xl);
  font-weight: 700;
  color: var(--arf-brand);
  margin: 0;
}

.amera-roi-form__btn--download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--arf-brand);
  color: #ffffff;
  border: none;
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-sm);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--arf-transition);
}

.amera-roi-form__btn--download:hover    { background: var(--arf-brand-dark); }
.amera-roi-form__btn--download:disabled { opacity: .6; cursor: not-allowed; }
.amera-roi-form__btn--download svg      { fill: currentColor; flex-shrink: 0; }

.amera-roi-form__results-section-heading {
  font-size: var(--arf-text-base);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #000000;
  margin: var(--arf-space-6) 0 var(--arf-space-3);
  border-bottom: 1px solid var(--arf-gray-400);
  padding-bottom: 6px;
}

.amera-roi-form__results-section-heading--spaced { margin-top: var(--arf-space-8); }

.amera-roi-form__results-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid #EFF0F7;
  font-size: var(--arf-text-base);
  gap: var(--arf-space-4);
}

.amera-roi-form__results-row__label {
  font-weight: 500;
  color: var(--arf-text-dark);
  text-align: left;
  flex: 1;
}

.amera-roi-form__results-row__value {
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
  color: var(--arf-text-dark);
  font-size: 15px;
}

/* Utilization row stacks vertically */
.amera-roi-form__results-row--utilization {
  flex-direction: column;
  align-items: stretch;
  gap: var(--arf-space-2);
  padding-bottom: var(--arf-space-3);
}

.amera-roi-form__results-row--utilization .amera-roi-form__results-row__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
}

.amera-roi-form__results-row--utilization .amera-roi-form__results-row__label { flex: 1; }

.amera-roi-form__results-row--utilization .amera-roi-form__util-bar {
  width: 100%;
  min-width: 0;
}

.amera-roi-form__results-live {
  font-weight: 700;
  color: var(--arf-text-dark);
  font-size: 15px;
}

/* Breakdown sub-list */
.amera-roi-form__breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.amera-roi-form__breakdown li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 0 0 1.5rem;
  font-size: var(--arf-text-sm);
  color: var(--arf-gray-700);
}

.amera-roi-form__breakdown li:nth-last-child(1) {
  border-bottom: 1px solid #EFF0F7;
}

.amera-roi-form__breakdown li::before {
  content: '–';
  margin-right: 6px;
  color: var(--arf-gray-500);
}

.amera-roi-form__breakdown__label { color: #82838E; margin-right: auto; }

.amera-roi-form__breakdown__value {
  color: #82838E;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}


/* ═══════════════════════════════════════════════════════
   UTILIZATION BAR
══════════════════════════════════════════════════════════ */
.amera-roi-form__util-bar {
  height: 10px;
  background: var(--arf-gray-200);
  border-radius: 5px;
  overflow: hidden;
  min-width: 120px;
}

.amera-roi-form__util-track { height: 100%; width: 100%; }

#roi-util-fill {
  height: 100%;
  background: var(--arf-green);
  border-radius: 5px;
  transition: width .6s ease;
  min-width: 0;
}


/* ═══════════════════════════════════════════════════════
   ADVISOR TIPS
══════════════════════════════════════════════════════════ */
#roi-advisor-tips {
  display: flex;
  flex-direction: column;
  gap: var(--arf-space-3);
  margin-top: var(--arf-space-4);
}

.amera-roi-form__advisor-tip {
  display: flex;
  gap: var(--arf-space-3);
  align-items: flex-start;
  background: #f0f6ff;
  border-left: 4px solid var(--arf-brand-mid);
  border-radius: var(--arf-radius);
  padding: 14px var(--arf-space-4);
  font-size: var(--arf-text-base);
  line-height: var(--arf-line);
  color: var(--arf-brand);
}

.amera-roi-form__advisor-tip__icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.amera-roi-form__advisor-tip p  { margin: 0; }
.amera-roi-form__advisor-tip a  { color: var(--arf-brand-mid); font-weight: 600; text-decoration: underline; }

.amera-roi-form__advisor-tip--all-good {
  border-color: #2E8A5C;
  background: #f0fff6;
  color: #1E5F3A;
}


/* ═══════════════════════════════════════════════════════
   CALCULATION OVERLAY
══════════════════════════════════════════════════════════ */
#apc-calc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 30, 54, .82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}

#apc-calc-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.amera-roi-form__overlay__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--arf-space-6);
}

.amera-roi-form__overlay__spinner {
  width: 72px;
  height: 72px;
  filter: drop-shadow(0 0 12px rgba(74, 144, 181, .6));
  animation: arf-overlay-spin 0.9s linear infinite;
  transform-origin: center;
}

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

.amera-roi-form__overlay__spinner circle { stroke: var(--arf-accent); }

.amera-roi-form__overlay__text {
  color: var(--arf-white);
  font-size: var(--arf-text-xl);
  font-weight: 600;
  letter-spacing: .02em;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}


/* ═══════════════════════════════════════════════════════
   DONUT CHART
══════════════════════════════════════════════════════════ */
.amera-roi-form__chart-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.amera-roi-form__chart-container::before {
  content: '';
  display: block;
  padding-bottom: 100%;
}

.amera-roi-form__chart-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.amera-roi-form__chart-svg { width: 100%; height: 100%; }

.amera-roi-form__chart-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 1;
  transition: opacity .4s;
}

.amera-roi-form__chart-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.amera-roi-form__chart-loader circle {
  fill: none;
  stroke: var(--arf-gray-200);
  stroke-width: 70;
  stroke-dasharray: 1036;
  stroke-dashoffset: 259;
  transform-origin: center;
  animation: arf-spin 1s linear infinite;
}

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

.amera-roi-form__chart-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
  width: 55%;
}

.amera-roi-form__chart-center__label {
  margin: 0 0 6px;
  font-size: clamp(12px, 3.5vw, 15px);
  font-weight: 500;
  color: #333;
  line-height: 1.3;
}

.amera-roi-form__chart-center__price {
  margin: 0;
  font-size: var(--arf-text-2xl) !important;
  font-weight: 700;
  color: #1A1A1A;
  line-height: 1;
}

.amera-roi-form__chart-title {
  margin: 12px 0 4px;
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 600;
  color: #000;
  text-align: center;
}

.amera-roi-form__chart-hint {
  font-size: var(--arf-text-xs);
  color: var(--arf-gray-500);
  margin: 0;
  text-align: center;
}

.amera-roi-form__chart-tooltip {
  position: absolute;
  background: var(--arf-white);
  color: var(--arf-brand);
  padding: 10px 14px;
  border-radius: var(--arf-radius);
  font-size: var(--arf-text-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  max-width: 220px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.amera-roi-form__chart-tooltip--visible { opacity: 1; }

.amera-roi-form__chart-tooltip__label {
  font-weight: 600;
  margin-bottom: var(--arf-space-1);
}

/* ── Notice banner ──────────────────────────────────────── */
.amera-roi-form__notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff4ec;
  border: 1px solid #f0b884;
  border-left: 4px solid var(--arf-orange);
  border-radius: 8px;
  color: #5a2a08;
  font-size: 14px;
  line-height: 1.5;
  animation: arf-notice-in .25s ease-out;
}

.amera-roi-form__notice[hidden] { display: none; }

.amera-roi-form__notice--error {
  background: #fdecea;
  border-color: #f5a7a1;
  border-left-color: #d33;
  color: #6a1b15;
}

.amera-roi-form__notice__icon {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1.4;
}

.amera-roi-form__notice__text {
  flex: 1;
}

.amera-roi-form__notice__close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  color: inherit;
  opacity: .6;
  transition: opacity var(--arf-transition);
}

.amera-roi-form__notice__close:hover { opacity: 1; }

@keyframes arf-notice-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* ── Field validation errors ───────────────────────────────────── */
.amera-roi-form__field--error input[type="number"] {
  border-color: #d33;
  box-shadow: 0 0 0 1px #d33;
  background: #fef6f5;
}

.amera-roi-form__field--error .amera-roi-form__input-icon { color: #d33; }

.amera-roi-form__field-error {
  color: #d33;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 4px;
  font-weight: 500;
  animation: arf-notice-in .2s ease-out;
}
/* ── Honeypot — must look real to bots, invisible to humans ─────────────────────── */
.amera-roi-form__hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}