/* ══════════════════════════════════════════════════
   TMI Cost Estimator — Main Styles
   Colors: #ef5a28 (orange/primary), #1c6e44 (green/secondary)
══════════════════════════════════════════════════ */

/* Reset & Container */
#tmi-estimator {
  font-family: inherit;
  color: #1a1a1a;
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  box-sizing: border-box;
}

#tmi-estimator *, #tmi-estimator *::before, #tmi-estimator *::after {
  box-sizing: inherit;
}

/* ─────────────────────────────────────────────────
   Progress Indicator
───────────────────────────────────────────────── */
.tmi-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.tmi-progress::-webkit-scrollbar { display: none; }

.tmi-progress-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 13px;
  color: #888;
  flex-shrink: 0;
}

.tmi-pill-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #eee;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: background 0.2s, color 0.2s;
}

.tmi-progress-pill.tmi-active .tmi-pill-num {
  background: #ef5a28;
  color: #fff;
}
.tmi-progress-pill.tmi-complete .tmi-pill-num {
  background: #1c6e44;
  color: #fff;
}
.tmi-progress-pill.tmi-active .tmi-pill-label {
  color: #ef5a28;
  font-weight: 600;
}
.tmi-progress-pill.tmi-complete .tmi-pill-label {
  color: #1c6e44;
}

.tmi-progress-sep {
  width: 24px;
  height: 2px;
  background: #ddd;
  flex-shrink: 0;
}
.tmi-progress-pill.tmi-complete + .tmi-progress-sep {
  background: #1c6e44;
}

/* ─────────────────────────────────────────────────
   Step Panels
───────────────────────────────────────────────── */
.tmi-step { animation: tmiIn 0.25s ease; }
@keyframes tmiIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tmi-step-header {
  margin-bottom: 24px;
  text-align: center;
}
.tmi-step-header h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #1a1a1a;
}
.tmi-step-header p {
  color: #555;
  font-size: 15px;
  margin: 0;
}

/* ─────────────────────────────────────────────────
   Service Cards Grid (Step 1)
───────────────────────────────────────────────── */
#tmi-service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.tmi-service-card {
  background: #fff;
  border: 2px solid #e5e5e5;
  border-radius: 10px;
  padding: 14px 10px;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.tmi-service-card:hover,
.tmi-service-card:focus-visible {
  border-color: #1c6e44;
  box-shadow: 0 2px 10px rgba(28,110,68,0.12);
  outline: none;
}

.tmi-service-card.tmi-selected {
  border-color: #1c6e44;
  background: #f0faf4;
  box-shadow: 0 2px 12px rgba(28,110,68,0.18);
}

.tmi-card-icon {
  width: 40px;
  height: 40px;
  color: #1c6e44;
  flex-shrink: 0;
}
.tmi-service-card.tmi-selected .tmi-card-icon { color: #1c6e44; }
.tmi-card-icon svg { width: 100%; height: 100%; }

.tmi-card-label {
  font-weight: 700;
  font-size: 13px;
  color: #1a1a1a;
  line-height: 1.2;
}

.tmi-card-desc {
  font-size: 11px;
  color: #777;
  line-height: 1.3;
}

/* ─────────────────────────────────────────────────
   Questions (Steps 2-3)
───────────────────────────────────────────────── */
.tmi-step-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #1a1a1a;
}

.tmi-question {
  margin-bottom: 24px;
}

.tmi-q-label {
  display: block;
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 10px;
  color: #222;
}

/* Button Groups */
.tmi-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tmi-btn-option {
  padding: 10px 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  min-height: 44px;
  font-family: inherit;
}

.tmi-btn-option:hover,
.tmi-btn-option:focus-visible {
  border-color: #ef5a28;
  outline: none;
}

.tmi-btn-option.tmi-selected {
  border-color: #ef5a28;
  background: #fff5f1;
  color: #ef5a28;
  font-weight: 700;
}

/* Sliders */
.tmi-slider-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tmi-slider {
  flex: 1;
  min-width: 200px;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 3px;
  background: linear-gradient(to right, #ef5a28 0%, #ef5a28 var(--pct, 20%), #ddd var(--pct, 20%));
  cursor: pointer;
}
.tmi-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef5a28;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.tmi-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: #ef5a28;
  cursor: pointer;
}
.tmi-slider:focus-visible { outline: 2px solid #ef5a28; outline-offset: 2px; }

.tmi-slider-num {
  width: 90px;
  padding: 8px 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  text-align: center;
  font-family: inherit;
  min-height: 44px;
}
.tmi-slider-num:focus { border-color: #ef5a28; outline: none; }

.tmi-slider-unit {
  font-size: 13px;
  color: #888;
  white-space: nowrap;
}

/* Number Input */
.tmi-number-wrap {}
.tmi-number-input {
  width: 120px;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  min-height: 44px;
}
.tmi-number-input:focus { border-color: #ef5a28; outline: none; }

/* Checkbox */
.tmi-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid #eee;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 15px;
  color: #333;
  min-height: 44px;
  width: 100%;
}
.tmi-checkbox-wrap:hover { border-color: #ef5a28; background: #fffaf8; }

.tmi-q-type-checkbox .tmi-q-label {
  display: none; /* label text is rendered inside the checkbox wrap span */
}

.tmi-checkbox {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: #ef5a28;
  cursor: pointer;
}

/* Select */
.tmi-select {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  min-height: 44px;
  background: #fff;
  cursor: pointer;
}
.tmi-select:focus { border-color: #ef5a28; outline: none; }

/* ─────────────────────────────────────────────────
   Results (Step 4) — Blur Gate
───────────────────────────────────────────────── */
.tmi-results-header {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
}

.tmi-results-service {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 4px;
}

.tmi-results-summary {
  font-size: 14px;
  color: #555;
  line-height: 1.6;
}

.tmi-price-box {
  border: 2px solid #e5e5e5;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 20px;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.tmi-price-label {
  font-size: 13px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

#tmi-blurred-price {
  font-size: 32px;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1;
  filter: blur(6px);
  user-select: none;
  transition: filter 0.5s ease, transform 0.3s ease;
  display: inline-block;
}

#tmi-blurred-price.tmi-unblurred {
  filter: none;
  user-select: auto;
}

.tmi-price-subtext {
  font-size: 12px;
  color: #aaa;
  margin-top: 8px;
}

.tmi-blur-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  transition: opacity 0.4s ease;
}
.tmi-price-box.tmi-revealed .tmi-blur-overlay {
  opacity: 0;
  pointer-events: none;
}

/* Disclaimers */
.tmi-disclaimer {
  background: #fffbeb;
  border: 1px solid #f5c842;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  color: #7a6600;
  margin-bottom: 20px;
  line-height: 1.5;
}

.tmi-warning-hazmat {
  background: #fff0f0;
  border: 1px solid #f98080;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: #c0392b;
  margin-bottom: 16px;
}

.tmi-warning-sfwmd {
  background: #f0f4ff;
  border: 1px solid #7fa8f0;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: #1a4f9c;
  margin-bottom: 16px;
}

.tmi-large-cap-warning {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 14px;
  color: #856404;
  margin-bottom: 16px;
}

/* Lead Form */
.tmi-gate-form {
  background: #f8fafb;
  border-radius: 12px;
  padding: 24px;
  border: 1.5px solid #e5e5e5;
}

.tmi-gate-form h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: #1a1a1a;
}
.tmi-gate-form .tmi-gate-subtext {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

.tmi-form-row {
  margin-bottom: 16px;
}
.tmi-form-row label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #333;
}
.tmi-form-row label .tmi-optional {
  font-weight: 400;
  color: #aaa;
  font-size: 12px;
}

.tmi-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 16px;   /* 16px prevents iOS zoom */
  font-family: inherit;
  background: #fff;
  transition: border-color 0.15s;
  min-height: 44px;
}
.tmi-form-input:focus {
  border-color: #ef5a28;
  outline: none;
}
.tmi-form-input.tmi-input-error {
  border-color: #e53e3e;
}

.tmi-form-row.tmi-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Honeypot */
.tmi-hp-field { display: none !important; position: absolute; left: -9999px; }

/* Field errors */
.tmi-field-error {
  display: block;
  color: #e53e3e;
  font-size: 12px;
  margin-top: 4px;
}

/* Form-level error */
.tmi-form-error {
  background: #fff0f0;
  border: 1px solid #f98080;
  border-radius: 8px;
  padding: 12px 16px;
  color: #c0392b;
  font-size: 14px;
  margin-bottom: 16px;
}

/* Submit button */
.tmi-btn-cta {
  width: 100%;
  padding: 16px 24px;
  background: #ef5a28;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  min-height: 56px;
  font-family: inherit;
  margin-top: 8px;
}
.tmi-btn-cta:hover { background: #d44e1e; }
.tmi-btn-cta:active { transform: scale(0.99); }
.tmi-btn-cta:disabled { opacity: 0.7; cursor: not-allowed; }

.tmi-btn-cta.tmi-btn-secondary {
  background: #1c6e44;
}
.tmi-btn-cta.tmi-btn-secondary:hover { background: #165737; }

/* ─────────────────────────────────────────────────
   Thank You (Step 5)
───────────────────────────────────────────────── */
.tmi-thankyou {
  text-align: center;
  padding: 20px 0;
}

.tmi-ty-check {
  width: 64px;
  height: 64px;
  background: #1c6e44;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: white;
  font-size: 28px;
}

.tmi-ty-headline {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 8px;
}

.tmi-ty-subtext {
  font-size: 15px;
  color: #555;
  margin-bottom: 20px;
}

.tmi-ty-estimate {
  background: #f0faf4;
  border: 2px solid #1c6e44;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 20px;
  display: inline-block;
  min-width: 260px;
}

.tmi-ty-estimate-label {
  font-size: 13px;
  color: #1c6e44;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.tmi-ty-estimate-range {
  font-size: 28px;
  font-weight: 800;
  color: #1a1a1a;
}

.tmi-ty-next {
  font-size: 15px;
  color: #444;
  margin-bottom: 24px;
  line-height: 1.6;
}

.tmi-ty-phone-cta {
  background: #fff3f0;
  border: 1.5px solid #ef5a28;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 15px;
  color: #333;
}
.tmi-ty-phone-cta a {
  color: #ef5a28;
  font-weight: 700;
  text-decoration: none;
}
.tmi-ty-phone-cta a:hover { text-decoration: underline; }

.tmi-ty-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  font-size: 13px;
  color: #555;
  line-height: 1.8;
  text-align: left;
  margin-bottom: 24px;
}

.tmi-ty-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────
   Navigation Buttons
───────────────────────────────────────────────── */
.tmi-nav-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}

.tmi-btn-nav {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-height: 44px;
  font-family: inherit;
}

.tmi-btn-nav.tmi-btn-next {
  background: #ef5a28;
  color: #fff;
  border: none;
}
.tmi-btn-nav.tmi-btn-next:hover { background: #d44e1e; }
.tmi-btn-nav.tmi-btn-next:disabled { opacity: 0.5; cursor: not-allowed; }

.tmi-btn-nav.tmi-btn-back {
  background: #fff;
  color: #555;
  border: 2px solid #ddd;
}
.tmi-btn-nav.tmi-btn-back:hover { border-color: #aaa; color: #333; }

/* ─────────────────────────────────────────────────
   Misc
───────────────────────────────────────────────── */
.tmi-error {
  background: #fff0f0;
  border: 1px solid #f98080;
  border-radius: 8px;
  padding: 14px 16px;
  color: #c0392b;
  font-size: 14px;
  margin-bottom: 16px;
}

.tmi-privacy-note {
  font-size: 12px;
  color: #aaa;
  text-align: center;
  margin-top: 12px;
  line-height: 1.4;
}
