/* Travel Emission Calculator widget styles.
   Everything is scoped under .tec-app (the shortcode's root container) and
   every class is tec-* prefixed, since this file is loaded on arbitrary
   WordPress pages alongside a theme and other plugins — nothing here may
   touch html/body or use generic class names that could collide/leak.

   Palette/layout replicate the design reference 1:1 (dark-green surrounding
   panel + white card, sage-green active tabs, muted-green submit button).
   This theme is fixed on purpose — it does not adapt to OS dark-mode
   preference, so it always matches the reference regardless of viewer
   settings. */

.tec-app {
  --color-bg: #f4f6f5;
  --color-surface: #ffffff;
  --color-primary: #4f7d43;
  --color-primary-dark: #3c6033;
  --color-primary-contrast: #ffffff;
  --color-button: #93c087;
  --color-button-hover: #7fae72;
  --color-button-contrast: #ffffff;
  --color-text: #20291f;
  --color-text-muted: #6b7770;
  --color-border: #e1e5e2;
  --color-border-strong: #c7cfc9;
  --color-error: #b3261e;
  --color-error-bg: #fdecea;
  --color-success: #3c6033;
  --color-success-bg: #eaf3e6;
  --color-focus-ring: #4f7d43;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-card:
    0 1px 2px rgba(16, 24, 21, 0.06), 0 8px 24px rgba(16, 24, 21, 0.06);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --font-sans:
    "Poppins", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial,
    sans-serif;
  --transition-fast: 150ms ease;
  --transition-medium: 220ms ease;

  display: block;
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-align: left;

  /* No background/border-radius here — the surrounding dark-green panel is
     supplied by the page section this shortcode is dropped into, not the
     widget itself, so this stays a plain layout wrapper around the card. */
  padding: var(--space-5) var(--space-4);
  max-width: 960px;
  margin: 0 auto;
}

.tec-app,
.tec-app *,
.tec-app *::before,
.tec-app *::after {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  .tec-app,
  .tec-app * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes tec-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

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

.tec-app a,
.tec-app button,
.tec-app input,
.tec-app select {
  font-family: inherit;
}

.tec-app :focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.tec-icon {
  flex-shrink: 0;
  object-fit: contain;
}

/* Header — sits above the white card on whatever background the shortcode
   is dropped into (typically a dark-green hero section on the live site);
   text colors are chosen to read on a dark background, matching that. */

.tec-app-header {
  text-align: center;
  margin: 0 0 var(--space-5);
}

.tec-app-header__eyebrow {
  margin: 0 0 var(--space-2);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #549f57;
}

.tec-app-header__title {
  margin: 0 0 var(--space-3);
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
}

.tec-app-header__subtitle {
  max-width: 560px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .tec-app-header__title {
    font-size: 1.5rem;
  }

  .tec-app-header__subtitle {
    font-size: 0.9375rem;
  }
}

/* Card */

.tec-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: var(--space-5) var(--space-5) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  /* No fill-mode: with "both"/"forwards" the browser pins the animated
     transform (even the identity matrix from the "to" keyframe) forever,
     which makes this card a containing block for any position:fixed
     descendant — silently breaking the mobile popover fix below, which
     needs position:fixed anchored to the true viewport. */
  animation: tec-fade-in 400ms ease;
}

.tec-card__section {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.tec-card__section--method {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.tec-method-info {
  position: relative;
}

.tec-method-info__trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  /* !important: the page's own theme/button styles otherwise win on hover
     and paint a solid dark-green square behind this trigger. */
  background: var(--color-surface) !important;
  color: var(--color-text-muted);
  cursor: pointer;
}

.tec-method-info__trigger:hover,
.tec-method-info__trigger:focus-visible {
  background: var(--color-surface) !important;
  color: var(--color-primary-dark);
  border-color: var(--color-primary);
}

.tec-method-info__trigger .tec-icon {
  width: 15px;
  height: 15px;
}

.tec-method-info__popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-3);
  z-index: 30;
  text-align: left;
  animation: tec-fade-in 150ms ease both;
}

.tec-method-info__item {
  margin: 0 0 var(--space-2);
  font-size: 0.8125rem;
  color: var(--color-text);
  line-height: 1.5;
}

.tec-method-info__item:last-child {
  margin-bottom: 0;
}

.tec-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tec-card__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  padding-top: var(--space-2);
}

/* Tabs (shared base for calculation-method and category tabs) */

.tec-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.tec-tabs__tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  border-radius: 6px;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.tec-tabs__tab:hover {
  background: var(--color-success-bg);
  color: var(--color-primary-dark);
  transform: translateY(-1px);
}

.tec-tabs__tab:active {
  transform: translateY(0);
}

.tec-tabs__tab .tec-icon {
  transition:
    transform var(--transition-medium),
    filter var(--transition-medium);
}

/* The tab icons are plain <img>s now, so they don't recolor via currentColor
   like the old inline-SVG set did — force a dark silhouette on the white
   inactive-tab background, and pure white on the green active tab,
   regardless of the source image's own tone. */
.tec-tabs__tab:not(.tec-tabs__tab--active) .tec-icon {
  filter: brightness(0);
  opacity: 0.65;
}

.tec-tabs__tab--active {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-color: var(--color-primary);
}

.tec-tabs__tab--active .tec-icon {
  transform: scale(1.1);
  filter: brightness(0) invert(1);
}

.tec-tabs__tab--active:hover {
  background: var(--color-primary-dark);
  color: var(--color-primary-contrast);
  transform: translateY(-1px);
}

/* Calculation-method toggle: compact pill pair, right-aligned */

.tec-card__section--method .tec-tabs {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2px;
  gap: 2px;
}

.tec-card__section--method .tec-tabs__tab {
  padding: var(--space-1) var(--space-3);
  font-size: 0.8125rem;
  border-radius: calc(var(--radius-md) - 2px);
}

/* Category tabs: icon + label, centered row with a divider beneath */

.tec-card__section:not(.tec-card__section--method) > .tec-tabs {
  flex-wrap: nowrap;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-3);
}

.tec-card__section:not(.tec-card__section--method) > .tec-tabs .tec-tabs__tab {
  flex: 1 1 0%;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  padding: 18px 16px;
  font-weight: 600;
}

.tec-normal-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tec-normal-content[hidden],
.tec-coming-soon[hidden] {
  display: none;
}

/* "AI" method placeholder — that backend isn't live yet */

.tec-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--color-success-bg);
  animation: tec-fade-in 250ms ease;
}

.tec-coming-soon__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--space-1);
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.tec-coming-soon__icon .tec-icon {
  width: 26px;
  height: 26px;
}

.tec-coming-soon__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-primary-contrast) !important;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tec-coming-soon__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text) !important;
}

.tec-coming-soon__text {
  margin: 0;
  max-width: 420px;
  font-size: 0.9375rem;
  color: var(--color-text-muted) !important;
  line-height: 1.5;
}

/* Dynamic form */

.tec-dynamic-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3) var(--space-4);
  align-items: start;
  opacity: 0;
  transform: translateY(6px);
}

.tec-dynamic-form--enter {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--transition-medium),
    transform var(--transition-medium);
}

/* Fields */

.tec-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  position: relative;
}

.tec-field--loading {
  gap: var(--space-1);
  color: var(--color-text-muted);
}

.tec-field__loading-text {
  margin: 0;
  font-size: 0.875rem;
}

.tec-field__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.tec-field__required {
  color: var(--color-error);
}

.tec-field__control {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 0.9375rem;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.tec-field__control:hover {
  border-color: var(--color-primary);
}

.tec-field__control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--color-primary) 25%, transparent);
}

.tec-field__control[readonly] {
  background: var(--color-bg);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.tec-field__control--select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  /* The theme's own generic `select` styles otherwise still add extra
     padding on top of ours, so pin every box-model property that affects
     height explicitly rather than trusting the cascade. */
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: var(--space-2) var(--space-6) var(--space-2) var(--space-3) !important;
  border: 1px solid var(--color-border-strong) !important;
  line-height: 1.5 !important;
  min-height: calc(0.9375rem * 1.5 + var(--space-2) * 2 + 2px);
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 55%,
    calc(100% - 13px) 55%;
  background-size:
    5px 5px,
    5px 5px;
  background-repeat: no-repeat;
}

.tec-field__error {
  margin: 0;
  min-height: 1.1em;
  font-size: 0.8125rem;
  color: var(--color-error);
  text-transform: capitalize;
}

.tec-field__error:not(:empty) {
  animation: tec-fade-in 180ms ease both;
}

.tec-field--invalid .tec-field__control {
  border-color: var(--color-error);
}

.tec-field--invalid .tec-field__control:focus {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-error) 25%, transparent);
}

/* Autocomplete */

.tec-field--autocomplete {
  z-index: 1;
}

/* Sibling fields each start their own stacking context at the same base
   z-index, so on a single-column mobile layout the next field down would
   otherwise render on top of an open dropdown above it. Whichever field's
   dropdown is currently open jumps above all its siblings. */
.tec-field--autocomplete-active {
  z-index: 50;
}

.tec-autocomplete__status {
  /* Absolutely positioned so loading/empty text never changes the field's
     own box height (it used to be a normal-flow paragraph, which visibly
     resized/flickered the whole field — and sibling grid columns — every
     time a search started or finished). */
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.tec-autocomplete__list {
  list-style: none;
  margin: 0;
  padding: var(--space-1);
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  max-height: 260px;
  overflow-y: auto;
  z-index: 20;
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.tec-autocomplete__list--open {
  opacity: 1;
  transform: none;
}

.tec-autocomplete__option {
  display: flex;
  flex-direction: column;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.tec-autocomplete__option:hover,
.tec-autocomplete__option--active {
  background: var(--color-success-bg);
}

.tec-autocomplete__option-label {
  font-size: 0.9375rem;
}

.tec-autocomplete__option-label mark {
  background: transparent;
  color: var(--color-primary-dark);
  font-weight: 700;
}

.tec-autocomplete__option-sublabel {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* Buttons */

.tec-btn {
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: none;
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  transition:
    background var(--transition-fast),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.tec-btn--primary {
  background: var(--color-button);
  color: var(--color-button-contrast);
}

.tec-btn--primary:active {
  transform: translateY(1px);
}

.tec-btn:disabled,
.tec-btn--loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.tec-btn:disabled:hover {
  transform: none;
}

.tec-btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
}

.tec-btn--loading .tec-btn__spinner {
  display: inline-flex;
  animation: tec-spin 0.8s linear infinite;
}

/* Summary / status */

.tec-form-summary {
  margin: 0;
  font-size: 0.9375rem;
  min-height: 1.2em;
  text-align: center;
}

.tec-form-summary--error {
  color: var(--color-error);
  animation: tec-fade-in 200ms ease both;
}

.tec-form-summary--success {
  color: var(--color-success);
  animation: tec-fade-in 200ms ease both;
}

/* lead-modal.css
   Modern lead capture modal matching the provided reference design.
   Replace your existing modal CSS with this file.
*/

/* Toasts */

.tec-toast-host {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.tec-toast {
  pointer-events: auto;
  min-width: 240px;
  max-width: 360px;
  padding: 14px 18px;
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  font-family: Poppins, Arial, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #fff !important;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.tec-toast--visible {
  opacity: 1;
  transform: translateY(0);
}

.tec-toast--success {
  background: #4f7d43;
}

.tec-toast--error {
  background: #d93025;
}

.tec-toast--info {
  background: #2563eb;
}

@media (max-width: 600px) {
  .tec-toast-host {
    left: 20px;
    right: 20px;
    align-items: stretch;
  }

  .tec-toast {
    max-width: none;
  }
}

.tec-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
}

.tec-modal-overlay[hidden] {
  display: none;
}

.tec-lead-modal {
  /* position:relative;
  width:min(440px,100%);
  max-height:75vh;
  overflow:auto;
  background:#fff;
  border-radius:18px;
  box-shadow:0 24px 60px rgba(0,0,0,.25);
  padding:40px 34px 30px;
  box-sizing:border-box;
  font-family:Poppins,Arial,sans-serif; */
  position: relative;
  width: min(463px, 100%);
  max-height: calc(100vh - 64px);
  background: #fff;
  border-radius: 34px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 40px 34px 30px;
  box-sizing: border-box;
  font-family: Poppins, Arial, sans-serif;
  overflow-y: auto;
  /* Scrolls internally so tall content never gets clipped against the
       viewport top/bottom, but the scrollbar itself stays hidden. */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}

.tec-lead-modal::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Chromium Edge */
}

.tec-lead-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;

  width: 35px;
  height: 35px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #ffffff;

  color: #111827;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;

  cursor: pointer;
  transition: all 0.2s ease;
}

.tec-lead-modal__close:hover {
  background: #f5f5f5;
  border-color: #d1d5db;
  transform: scale(1.05);
}

.tec-lead-modal__close:active {
  transform: scale(0.95);
}

.tec-lead-modal__title {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.18;
  font-weight: 700;
  color: #121212;
}

.tec-lead-modal__subtitle {
  max-width: 390px;
  margin: 20px auto 28px;
  text-align: center;
  color: #59616b;
  font-size: 0.875rem;
  line-height: 1.8;
}

.tec-lead-modal__divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0 0 28px;
}

.tec-lead-modal__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tec-lead-modal__form[hidden] {
  display: none;
}
.tec-lead-modal__field {
  display: flex;
  flex-direction: column;
}
.tec-lead-modal__label {
  margin-bottom: 4px;
  font-size: 13px;
  color: #575757;
}

.tec-lead-modal__input {
  box-sizing: border-box;
  outline: none;
  width: 100%;
  padding: 0.75rem;
  font-size: 15px;
  border: 1px solid #d1d1d1;
  border-radius: 0.375rem;
  background: white;
  color: #1a1a1a;
  transition: all 0.2s;
}
.tec-lead-modal__input::placeholder {
  color: #8b8b8b;
}
.tec-lead-modal__input:focus {
  border-color: #6fa96e;
  box-shadow: 0 0 0 3px rgba(111, 169, 110, 0.15);
}

.tec-lead-modal__select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  /* The WordPress theme's own generic `select` styles otherwise still add
     extra padding/line-height on top of ours, so pin every box-model
     property that affects height explicitly rather than trusting the
     cascade — same technique used for .tec-field__control--select. */
  box-sizing: border-box !important;
  margin: 0 !important;
  width: 100% !important;
  padding: 0.75rem 2.5rem 0.75rem 0.75rem !important;
  border: 1px solid #d1d1d1 !important;
  border-radius: 0.375rem !important;
  line-height: 1.5 !important;
  font-size: 15px !important;
  color: #1a1a1a !important;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='2'/%3E%3C/svg%3E")
    white no-repeat right 16px center !important;
}

.tec-lead-modal__checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.tec-lead-modal__checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.tec-lead-modal__error {
  min-height: 18px;
  color: #d93025;
  font-size: 14px;
  margin: 0;
}

.tec-lead-modal__field-error {
  min-height: 16px;
  color: #d93025;
  font-size: 12.5px;
  margin: 4px 0 0;
}

.tec-lead-modal__suggestion {
  display: block;
  margin: 4px 0 0;
  padding: 0;
  border: none !important;
  background: none !important;
  text-align: left;
  font-size: 12.5px;
  color: #2563eb !important;
  cursor: pointer;
}
/* !important: the theme's own generic button hover styles otherwise paint
   a dark background here instead of the plain underline this is meant to
   have — same interference pattern as .tec-method-info__trigger above. */
.tec-lead-modal__suggestion:hover {
  background: none !important;
  color: #2563eb !important;
  text-decoration: underline;
}
.tec-lead-modal__suggestion[hidden] {
  display: none;
}

.tec-btn {
  width: 100%;
  height: 56px;
  border: none;
  background: #a7cfa5;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}
/* Bold/dark green once every required field in the button's form is
   filled — set via setReady(), not hover, so it reflects form completion
   rather than mouse position. */
.tec-btn--ready {
  background: #4f7d43;
}

.tec-lead-modal__footnote {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  margin-top: 6px;
}

.tec-otp__intro {
  margin: 0 0 4px;
}
.tec-otp__meta {
  margin: 0 0 12px;
  text-align: center;
  color: #8b8b8b;
  font-size: 13px;
}
.tec-otp__input {
  letter-spacing: 0.3em;
  text-align: center;
  font-weight: 600;
}
.tec-otp__actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tec-otp__resend,
.tec-otp__change-email {
  border: none;
  background: none;
  padding: 0;
  color: #4a8f48;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.tec-otp__resend:hover,
.tec-otp__change-email:hover {
  text-decoration: underline;
}
.tec-otp__resend:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* Results modal — shown as soon as the emission API responds successfully. */
.tec-results-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 64px);
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 32px 32px 28px;
  box-sizing: border-box;
  font-family: Poppins, Arial, sans-serif;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.tec-results-modal::-webkit-scrollbar {
  display: none;
}

.tec-results-modal__title {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1.3;
  font-weight: 700;
  color: #121212;
}
.tec-results-modal__subtitle {
  margin: 8px auto 24px;
  text-align: center;
  color: #59616b;
  font-size: 0.875rem;
  line-height: 1.6;
}
.tec-results-modal__divider {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 0 0 24px;
}

.tec-results-modal__total-card {
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  background: linear-gradient(135deg, #17a879 0%, #0b6e52 100%);
  margin-bottom: 28px;
}
.tec-results-modal__total-label {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(6, 34, 24, 0.75);
}
.tec-results-modal__total-value {
  margin: 0;
  font-size: 52px;
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.tec-results-modal__total-unit {
  margin: 8px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.tec-results-modal__section {
  margin-bottom: 24px;
}
.tec-results-modal__section-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 700;
  color: #121212;
}

.tec-results-modal__journey-card {
  background: #f5f6f7;
  border-radius: 16px;
  padding: 20px;
}
.tec-results-modal__journey-info {
  min-width: 0;
}
.tec-results-modal__route {
  display: flex;
  gap: 12px;
  margin: 0 0 14px;
}
.tec-results-modal__route-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}
.tec-results-modal__route-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tec-results-modal__route-dot--from {
  background: #17a879;
}
.tec-results-modal__route-dot--to {
  background: #1f2937;
}
.tec-results-modal__route-line {
  flex: 1;
  width: 2px;
  min-height: 18px;
  background: #d1d5db;
  margin: 4px 0;
}
.tec-results-modal__route-rows {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  flex: 1;
}
.tec-results-modal__route-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tec-results-modal__route-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}
.tec-results-modal__route-value {
  font-size: 15px;
  font-weight: 700;
  color: #121212;
  line-height: 1.4;
  overflow-wrap: break-word;
}
.tec-results-modal__journey-line {
  margin: 0 0 12px;
  font-size: 13px;
  color: #6b7280;
}
.tec-results-modal__journey-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #4b5563;
}
.tec-results-modal__journey-details li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tec-results-modal__info-row {
  margin: 0 0 8px;
  font-size: 14px;
  color: #4b5563;
}
.tec-results-modal__info-row strong {
  color: #121212;
  font-weight: 600;
}

.tec-results-modal__impact-card {
  background: #eaf7f1;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
.tec-results-modal__impact-card p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #374151;
}
.tec-results-modal__impact-card p:last-child {
  margin-bottom: 0;
}
.tec-results-modal__impact-card strong {
  color: #121212;
}

.tec-results-modal__download-btn {
  margin: 0;
}
.tec-results-modal__download-btn:hover {
  background: #4f7d43;
}

@media (max-width: 600px) {
  .tec-results-modal {
    padding: 24px 20px 20px;
    border-radius: 18px;
  }
  .tec-results-modal__title {
    font-size: 22px;
  }
  .tec-results-modal__total-value {
    font-size: 40px;
  }
}

@media (max-width: 600px) {
  .tec-lead-modal {
    padding: 34px 24px 26px;
    border-radius: 16px;
  }
  .tec-lead-modal__title {
    font-size: 28px;
  }
  .tec-lead-modal__subtitle {
    font-size: 16px;
  }
  .tec-lead-modal__input {
    font-size: 16px;
  }
  .tec-btn {
    font-size: 14px;
    letter-spacing: 1px;
  }
}

/* Responsive */

@media (max-width: 640px) {
  .tec-card {
    padding: var(--space-5) var(--space-4) var(--space-4);
    border-radius: var(--radius-md);
  }

  .tec-dynamic-form {
    grid-template-columns: 1fr;
  }

  .tec-card__section:not(.tec-card__section--method) > .tec-tabs {
    gap: var(--space-1);
  }

  .tec-card__section:not(.tec-card__section--method)
    > .tec-tabs
    .tec-tabs__tab {
    padding: var(--space-2) var(--space-3);
    font-size: 0.8125rem;
  }

  .tec-card__footer .tec-btn {
    font-size: 0.8125rem;
  }

  /* On a narrow card the popover's containing block is the tiny 26px "?"
     button itself, so a fixed 280px right-anchored box swallows the tabs
     row beneath it. Switching to viewport-fixed sidesteps that entirely —
     it becomes a slim banner under the header instead of a floating box
     that hides navigation. */
  .tec-method-info__popover {
    position: fixed;
    top: 76px;
    left: var(--space-4);
    right: var(--space-4);
    width: auto;
    max-width: none;
  }
}
