/* -----------------------------------------------------------------------------
 * country.css
 * Styling for the Country selector added to Step 1, beside the "Start Over"
 * button. Colours, fonts and control shapes intentionally reuse the existing
 * design tokens from style.css (e.g. the .custom-select / .btn.gr look) so the
 * new control is visually consistent with the rest of the calculator.
 * -------------------------------------------------------------------------- */

/* Row that holds the Country selector and the Start Over button together,
   aligned to the right on desktop to sit at the top of the page. */
.country-startover {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

/* Label + dropdown pairing. */
.country-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.country-label {
  font-weight: 700;
  font-size: 18px;
  color: #394c5b;
  white-space: nowrap;
  margin: 0;
}

/* Constrain the shared .custom-select width for the compact country control.
   Two class names give this rule priority over the base .custom-select rule. */
.custom-select.country-select {
  min-width: 160px;
  max-width: 200px;
  text-align: left;
}

/* Helper text beneath the selector. */
.country-helper {
  font-size: 15px !important;
  font-style: italic;
  color: #51626f;
  line-height: 150%;
  margin: 10px 0 0 0;
  max-width: 520px;
  margin-left: auto; /* keep aligned under the right-hand control block */
}

/* On tablet / mobile, stack to the left so nothing is cramped. */
@media screen and (max-width: 991.98px) {
  .country-startover {
    justify-content: flex-start;
  }
  .country-helper {
    margin-left: 0;
    text-align: left;
  }
}

@media screen and (max-width: 767.98px) {
  .country-selector {
    flex-wrap: wrap;
  }
  .custom-select.country-select {
    min-width: 140px;
  }
}

/* -----------------------------------------------------------------------------
 * Canada-only slider end-value labels (Step 1 "meters in service" and Step 2
 * "meters replacing"). Injected by country-config.js only when Canada is
 * active, so the US slider UI is unchanged.
 * -------------------------------------------------------------------------- */
.slider-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #51626f;
}
.slider-ends .slider-min,
.slider-ends .slider-max {
  white-space: nowrap;
}

/* -----------------------------------------------------------------------------
 * Per-step country selector (added to every step header so the user can switch
 * between US and Canada from any step). Kept visually consistent with the
 * Step 1 selector and right-aligned within the header column.
 * -------------------------------------------------------------------------- */
.step-country {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  justify-content: flex-end;
}
.step-country .country-label {
  margin: 0;
}
@media (min-width: 768px) {
  .text-md-end .step-country {
    margin-left: auto;
  }
}
