/* ============================================================
   Solana Energy Concepts — Theme Override
   Navy / Warm Gold / Sunset Gold / Warm Cream
   Dark theme: navy backgrounds, gold accents, white text
   ============================================================ */

:root {
  --mx-primary: #1a1a2e;
  --mx-secondary: #f5f0e8;
  --mx-accent: #D4A843;
  --mx-accent-secondary: #E89B20;
  --mx-text: #1a1a2e;
  --mx-text-light: #666666;
  --mx-background: #ffffff;
  --mx-surface: #faf8f5;
  --mx-error: #dc3545;
  --mx-warning: #f0ad4e;
  --mx-success: #28a745;
  --mx-font-heading: 'Montserrat', sans-serif;
  --mx-font-body: 'Lato', sans-serif;
  --mx-border: rgba(255, 255, 255, 0.1);
  --mx-border-light: rgba(255, 255, 255, 0.06);
  --mx-hover: rgba(255, 255, 255, 0.06);
  --mx-card-bg: rgba(255, 255, 255, 0.06);
}

/* ---- GLOBAL DARK OVERRIDES ---- */
.mx-calculator {
  --mx-text: #ffffff;
  --mx-text-light: rgba(255, 255, 255, 0.65);
  background: #0f0f1e;
  color: #ffffff;
}

/* ---- HEADER ---- */
.mx-calculator .mx-header {
  position: relative !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 1rem 1.5rem !important;
  min-height: 80px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: rgba(26, 26, 46, 0.97) !important;
}

.mx-calculator .mx-header-logo {
  z-index: 2 !important;
}

.mx-calculator .mx-header-nav {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
  z-index: 1 !important;
  white-space: nowrap !important;
}

.mx-calculator .mx-close-btn {
  justify-self: end !important;
}

.mx-calculator .mx-header-logo-name {
  color: var(--mx-accent);
}

.mx-calculator .mx-header-logo-sub {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- NAV ---- */
.mx-calculator .mx-nav-step {
  color: rgba(255, 255, 255, 0.35);
}

.mx-calculator .mx-nav-step.mx-nav-active {
  color: var(--mx-accent);
}

.mx-calculator .mx-nav-step.mx-nav-completed {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-nav-dot {
  background: rgba(255, 255, 255, 0.15);
}

/* ---- CLOSE BUTTON ---- */
.mx-calculator .mx-close-btn {
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
}

.mx-calculator .mx-close-btn svg {
  stroke-width: 2.5 !important;
}

.mx-calculator .mx-close-btn:hover {
  border-color: #fff !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.2) !important;
}

/* ---- SCROLLBAR ---- */
.mx-calculator .mx-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

/* ---- STEP BADGE ---- */
.mx-calculator .mx-step-badge {
  color: var(--mx-accent);
}

/* ---- TYPOGRAPHY ---- */
.mx-calculator .mx-step-title {
  color: #ffffff;
}

.mx-calculator .mx-step-subtitle {
  color: rgba(255, 255, 255, 0.6);
}

/* ---- PRIMARY BUTTONS (gold) ---- */
.mx-calculator .mx-btn-primary {
  background: var(--mx-accent);
  color: #1a1a2e;
}

.mx-calculator .mx-btn-primary:hover:not(:disabled) {
  background: #c49a38;
  box-shadow: 0 4px 12px rgba(212, 168, 67, 0.3);
}

/* ---- OUTLINE BUTTONS ---- */
.mx-calculator .mx-btn-outline {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mx-calculator .mx-btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ---- BACK BUTTON ---- */
.mx-calculator .mx-btn-back {
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.15);
}

.mx-calculator .mx-btn-back:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.06);
}

/* ---- UPLOAD ZONE (gold instead of black) ---- */
.mx-calculator .mx-upload-zone {
  background: var(--mx-accent);
  color: #1a1a2e;
}

.mx-calculator .mx-upload-zone:hover,
.mx-calculator .mx-upload-zone.mx-drag-over {
  background: #c49a38;
  box-shadow: 0 8px 24px rgba(212, 168, 67, 0.25);
}

.mx-calculator .mx-upload-zone-icon svg {
  stroke: #1a1a2e;
}

.mx-calculator .mx-upload-zone-heading {
  color: #1a1a2e;
}

.mx-calculator .mx-format-chip {
  color: rgba(26, 26, 46, 0.7);
  background: rgba(26, 26, 46, 0.1);
  border-color: rgba(26, 26, 46, 0.2);
}

.mx-calculator .mx-upload-success-check svg {
  stroke: #1a1a2e;
}

.mx-calculator .mx-upload-success-filename {
  color: #1a1a2e;
}

.mx-calculator .mx-upload-success-ready {
  color: rgba(26, 26, 46, 0.7);
}

/* ---- UPLOADED FILES ---- */
.mx-calculator .mx-file-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
}

.mx-calculator .mx-file-chip-name {
  color: #ffffff;
}

.mx-calculator .mx-file-chip-size {
  color: rgba(255, 255, 255, 0.4);
}

.mx-calculator .mx-file-remove {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-file-remove:hover {
  background: rgba(220, 53, 69, 0.15);
  color: var(--mx-error);
}

.mx-calculator .mx-add-more-btn {
  color: rgba(255, 255, 255, 0.4);
  border-color: rgba(255, 255, 255, 0.15);
}

.mx-calculator .mx-add-more-btn:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---- PROCESSING SPINNER ---- */
.mx-calculator .mx-processing {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-processing-ring {
  border-top-color: var(--mx-accent);
}

.mx-calculator .mx-spinner {
  border-top-color: var(--mx-accent);
}

.mx-calculator .mx-processing-title {
  color: #ffffff;
}

.mx-calculator .mx-processing-detail {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- FALLBACK / ADDRESS INPUT ---- */
.mx-calculator .mx-fallback-divider::before,
.mx-calculator .mx-fallback-divider::after {
  background: rgba(255, 255, 255, 0.1);
}

.mx-calculator .mx-fallback-divider span {
  color: rgba(255, 255, 255, 0.35);
}

.mx-calculator .mx-inline-address-wrapper {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.mx-calculator .mx-inline-address-wrapper:focus-within {
  border-color: var(--mx-accent);
}

.mx-calculator .mx-inline-address-icon {
  color: rgba(255, 255, 255, 0.35);
}

.mx-calculator .mx-inline-address-input {
  color: #ffffff;
}

.mx-calculator .mx-inline-address-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.mx-calculator .mx-inline-address-input.mx-forced-light::-webkit-input-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-inline-address-input.mx-forced-light::-moz-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-inline-address-input.mx-forced-light:-ms-input-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-inline-address-input.mx-forced-light::placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }

/* ---- ADDRESS INPUT (step 1b) ---- */
.mx-calculator .mx-address-input-wrapper {
  display: flex !important;
  visibility: visible !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
}

.mx-calculator .mx-address-input-wrapper:focus-within {
  border-color: var(--mx-accent);
}

.mx-calculator .mx-input-icon {
  color: rgba(255, 255, 255, 0.35);
}

.mx-calculator .mx-address-input {
  color: #ffffff;
}

.mx-calculator .mx-address-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.mx-calculator .mx-address-input.mx-forced-light::-webkit-input-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-address-input.mx-forced-light::-moz-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-address-input.mx-forced-light:-ms-input-placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }
.mx-calculator .mx-address-input.mx-forced-light::placeholder { color: #1a1a2e !important; opacity: 0.7 !important; }

/* ---- SUGGESTIONS DROPDOWN ---- */
.mx-calculator .mx-suggestions-dropdown {
  background: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.12);
}

.mx-calculator .mx-suggestion-item {
  color: #ffffff;
}

.mx-calculator .mx-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* ---- PROPERTY PREVIEW ---- */
.mx-calculator .mx-property-preview {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.mx-calculator .mx-preview-address {
  color: #ffffff;
}

.mx-calculator .mx-preview-coords {
  color: rgba(255, 255, 255, 0.4);
}

.mx-calculator .mx-map-pin-hint {
  background: rgba(26, 26, 46, 0.85);
  color: rgba(255, 255, 255, 0.7);
}

#mx-preview-map {
  width: 100% !important;
  height: 320px !important;
  border-radius: 12px !important;
  z-index: 1 !important;
  background: #111 !important;
}

.mx-hidden {
  display: none !important;
}

/* ---- UTILITY DETECTION ---- */
.mx-calculator .mx-utility-detection {
  background: rgba(212, 168, 67, 0.08);
  border-color: rgba(212, 168, 67, 0.2);
}

.mx-calculator .mx-detected-utility-name {
  color: #ffffff;
}

/* ---- FORM GROUPS ---- */
.mx-calculator .mx-form-group label {
  color: rgba(255, 255, 255, 0.7);
}

.mx-calculator .mx-form-group input,
.mx-calculator .mx-form-group select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.mx-calculator .mx-form-group input:focus,
.mx-calculator .mx-form-group select:focus {
  border-color: var(--mx-accent);
}

.mx-calculator select,
.mx-calculator .mx-ev-select {
  color-scheme: dark !important;
  background: var(--mx-primary) !important;
  color: #ffffff !important;
  appearance: none;
  cursor: pointer;
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.mx-calculator select option,
.mx-calculator .mx-ev-select option {
  background-color: var(--mx-primary) !important;
  color: #ffffff !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0px transparent !important;
}

.mx-calculator select optgroup,
.mx-calculator .mx-ev-select optgroup {
  background-color: var(--mx-primary) !important;
  color: var(--mx-accent) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  -webkit-text-stroke: 0px transparent !important;
}

/* Specific fix for macOS Chrome/Safari Native Dropdown */
.mx-calculator select:focus {
  outline: none;
  border-color: var(--mx-accent) !important;
}

/* ---- EXTRACT FIELDS ---- */
.mx-calculator .mx-extract-field {
  border-color: rgba(255, 255, 255, 0.06);
}

.mx-calculator .mx-extract-label {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-extract-value {
  color: #ffffff;
}

/* ---- USAGE GRAPH ---- */
.mx-calculator .mx-usage-graph-section {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-usage-graph-badge {
  background: rgba(212, 168, 67, 0.15);
  color: var(--mx-accent);
}

.mx-calculator .mx-usage-total-row {
  border-color: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
}

/* ---- COST CARDS (dark backgrounds) ---- */
.mx-calculator .mx-cost-cards {
  color: #ffffff;
}

.mx-calculator .mx-cost-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-cost-card-value {
  color: #ffffff;
}

.mx-calculator .mx-cost-card-label {
  color: rgba(255, 255, 255, 0.5);
}

/* ---- FORECAST SECTION (dark backgrounds) ---- */
.mx-calculator .mx-forecast-section {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-forecast-header h4 {
  color: #ffffff;
}

.mx-calculator .mx-forecast-badge {
  background: rgba(212, 168, 67, 0.12);
  color: var(--mx-accent);
}

.mx-calculator .mx-forecast-grid {
  color: #ffffff;
}

.mx-calculator .mx-forecast-card {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-forecast-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mx-calculator .mx-forecast-card-label {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-forecast-card-value {
  color: #ffffff;
}

.mx-calculator .mx-forecast-card-sub {
  color: rgba(255, 255, 255, 0.4);
}

.mx-calculator .mx-forecast-note {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
}

/* ---- USAGE TABLE ---- */
.mx-calculator .mx-usage-table-toggle {
  color: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.mx-calculator .mx-usage-table-toggle:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}

.mx-calculator .mx-usage-table-hint {
  color: rgba(255, 255, 255, 0.4);
}

.mx-calculator .mx-usage-table input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ---- MAP CONFIRMATION ---- */
.mx-calculator .mx-location-confirm {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-location-confirm-text {
  color: rgba(255, 255, 255, 0.7);
}

/* ---- MISSING FIELDS ---- */
.mx-calculator .mx-missing-fields input,
.mx-calculator .mx-missing-fields select {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* ---- ROOF OPTIONS ---- */
.mx-calculator .mx-roof-option {
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.mx-calculator .mx-roof-option:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

/* ---- LOADING STEPS ---- */
.mx-calculator .mx-loading-step {
  color: rgba(255, 255, 255, 0.6);
}

.mx-calculator .mx-ls-dot {
  background: rgba(255, 255, 255, 0.15);
}

/* ---- RESULTS GRID ---- */
.mx-calculator .mx-result-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-result-card--highlight {
  border-color: var(--mx-accent);
  background: rgba(212, 168, 67, 0.08);
}

.mx-calculator .mx-result-card-label {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-result-card-value {
  color: #ffffff;
}

/* ---- DATA SOURCE ---- */
.mx-calculator .mx-data-source {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

/* ---- TEASER DISCLAIMER ---- */
.mx-calculator .mx-teaser-disclaimer {
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.06);
}

/* ---- NON-SERVICEABLE AREA MODAL ---- */
.mx-calculator .mx-nsa-card {
  background: #1a1a2e;
  color: #ffffff;
}

.mx-calculator .mx-nsa-heading {
  color: #ffffff;
}

.mx-calculator .mx-nsa-body,
.mx-calculator .mx-nsa-state,
.mx-calculator .mx-nsa-sub {
  color: rgba(255, 255, 255, 0.6);
}

.mx-calculator .mx-nsa-dismiss-link {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-nsa-footer {
  color: rgba(255, 255, 255, 0.3);
}

/* ---- FOOTER ---- */
.mx-calculator .mx-footer {
  background: rgba(15, 15, 30, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mx-calculator .mx-footer a {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-footer a:hover {
  color: var(--mx-accent);
}

.mx-calculator .mx-footer-copy {
  color: rgba(255, 255, 255, 0.35);
}

.mx-calculator .mx-footer-dot {
  color: rgba(255, 255, 255, 0.2);
}

/* ======== STEP 0: WELCOME + SERVICE SELECTION (dark) ======== */
.mx-calculator .mx-welcome-heading {
  color: #ffffff;
}

.mx-calculator .mx-welcome-sub {
  color: rgba(255, 255, 255, 0.6);
}

/* Nuke the outer container's grey box wrapper */
.mx-calculator .mx-step-container--welcome {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* Service cards: Transparent floating boxes with no hard borders */
.mx-calculator .mx-service-card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Nuke any ghost backgrounds appearing inside the cards because of parent CMS themes */
.mx-calculator .mx-service-card .mx-service-card-body,
.mx-calculator .mx-service-card .mx-service-card-title,
.mx-calculator .mx-service-card .mx-service-card-desc {
  background-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  outline: none !important;
}

/* Keep the icon background subtly visible if it exists */
.mx-calculator .mx-service-card .mx-service-card-icon,
.mx-calculator .mx-service-card-icon {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}

.mx-calculator .mx-service-card:hover {
  border-color: rgba(255, 255, 255, 0.3) !important;
  background: rgba(255, 255, 255, 0.03) !important;
}

.mx-calculator .mx-service-card.mx-selected {
  border: 1px solid var(--mx-accent) !important;
  background: rgba(212, 168, 67, 0.08) !important;
}

.mx-calculator .mx-service-card-icon {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff;
}

.mx-calculator .mx-service-card-icon svg {
  stroke: #D4A843 !important;
}

.mx-calculator .mx-service-card.mx-selected .mx-service-card-icon {
  background: rgba(212, 168, 67, 0.2) !important;
}

.mx-calculator .mx-service-card.mx-selected .mx-service-card-icon svg {
  stroke: #D4A843 !important;
}

.mx-calculator .mx-service-card-title {
  color: #ffffff;
}

.mx-calculator .mx-service-card-desc {
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-service-card-check {
  border-color: rgba(255, 255, 255, 0.15);
}

.mx-calculator .mx-service-card-check svg {
  stroke: rgba(255, 255, 255, 0.2);
}

.mx-calculator .mx-service-card.mx-selected .mx-service-card-check {
  background: var(--mx-accent);
  border-color: var(--mx-accent);
}

.mx-calculator .mx-service-card.mx-selected .mx-service-card-check svg {
  stroke: #1a1a2e;
}

/* .mx-logo-inline: should NOT appear in Solana (it's Maxify-specific) */
.mx-calculator .mx-logo-inline {
  display: none;
}

/* EV Recommendation Banner */
#mx-ev-recommendation-banner {
  animation: mx-fade-in-up 0.5s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

#mx-ev-recommendation-banner strong,
#mx-ev-recommendation-banner b {
  color: #fff;
  font-weight: 700;
}

/* ======== LEAD GATE FORM (dark inputs, white labels) ======== */
.mx-calculator .mx-lead-gate-form {
  color: #ffffff;
}

.mx-calculator .mx-lead-field label {
  color: rgba(255, 255, 255, 0.7);
}

.mx-calculator .mx-lead-field input {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.mx-calculator .mx-lead-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.mx-calculator .mx-lead-field input:focus {
  border-color: var(--mx-accent);
  background: rgba(255, 255, 255, 0.08);
}

.mx-calculator .mx-lead-field input[readonly] {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.5);
}

.mx-calculator .mx-field-error {
  color: var(--mx-error);
}

.mx-calculator .mx-lead-disclaimer {
  color: rgba(255, 255, 255, 0.35);
}

/* ======== COOKIE BANNER (light gold on dark) ======== */
.mx-calculator .mx-cookie-banner {
  background: #1a1a2e;
  border-top: 1px solid rgba(212, 168, 67, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.mx-calculator .mx-cookie-text a {
  color: var(--mx-accent);
}

.mx-calculator .mx-cookie-accept {
  background: var(--mx-accent);
  color: #1a1a2e;
}

.mx-calculator .mx-cookie-accept:hover {
  background: #c49a38;
}

.mx-calculator .mx-cookie-decline {
  color: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.mx-calculator .mx-cookie-decline:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.5);
}

/* ======== GOOGLE MAPS ERROR SUPPRESSION ======== */
.mx-calculator .gm-err-container,
.mx-calculator .gm-err-autocomplete,
.mx-calculator .gm-err-icon,
.mx-calculator .gm-err-content,
.mx-calculator .gm-err-message,
.mx-calculator .gm-err-title {
  display: none !important;
}

/* ======== BILL ANALYSIS ======== */
.mx-calculator .mx-bill-analysis {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

/* ======== EXTRACT SUMMARY ======== */
.mx-calculator .mx-extract-summary {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
}

/* ======== SERVICE LOCATIONS ======== */
.mx-calculator .mx-service-locations {
  color: rgba(255, 255, 255, 0.7);
}

/* ======== ADDRESS-ONLY MODE ======== */
.mx-calculator .mx-address-only-mode .mx-address-only-bar {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.mx-calculator .mx-address-only-mode .mx-address-only-bar:focus-within {
  border-color: var(--mx-accent);
}

/* ======================================================
   DARK THEME OVERRIDE — Fix all white/light box issues
   Overrides hardcoded #FFFFFF and #fff in calculator.css
   ====================================================== */

/* Fix missing-field inputs (was background: #FFFFFF) */
.mx-calculator .mx-missing-field-row input,
.mx-calculator .mx-missing-field-row select {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
.mx-calculator .mx-missing-field-row input::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}
.mx-calculator .mx-missing-field-row input:focus {
  border-color: var(--mx-accent) !important;
  box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15) !important;
}
.mx-calculator .mx-missing-field-row label {
  color: rgba(255, 255, 255, 0.55) !important;
}
.mx-calculator .mx-missing-fields h4 {
  color: #ffffff !important;
}

/* Fix usage table grid (was background: #FFFFFF) */
.mx-calculator .mx-usage-cell,
.mx-calculator .mx-usage-table-toggle,
.mx-calculator .mx-service-locations {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}
.mx-calculator .mx-usage-input {
  color: #ffffff !important;
}

/* ======================================================
   GOOGLE PLACES AUTOCOMPLETE DARK THEME
   Fixes the white dropdown with invisible white text
   ====================================================== */
.pac-container {
  background-color: #1a1a2e !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5) !important;
  font-family: var(--mx-font-body, 'Lato', sans-serif) !important;
  z-index: 999999 !important;
}
.pac-item {
  color: rgba(255,255,255,0.85) !important;
  border-top: 1px solid rgba(255,255,255,0.05) !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
}
.pac-item:hover {
  background-color: rgba(255,255,255,0.05) !important;
}
.pac-item-query {
  color: #ffffff !important;
  font-weight: 600 !important;
}
.pac-matched {
  color: var(--mx-accent, #D4A843) !important;
}
.pac-icon {
  filter: invert(1) opacity(0.7) !important;
}

/* Fix forecast cards (was background: var(--mx-background, #fff)) */
.mx-calculator .mx-forecast-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}
.mx-calculator .mx-forecast-card-label {
  color: rgba(255, 255, 255, 0.5) !important;
}
.mx-calculator .mx-forecast-card-value {
  color: #ffffff !important;
}
.mx-calculator .mx-forecast-card-sub {
  color: rgba(255, 255, 255, 0.4) !important;
}

/* Fix forecast note (was background: var(--mx-background, #fff)) */
.mx-calculator .mx-forecast-note {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix cost cards (was background: var(--mx-card-bg, #F5F5F5)) */
.mx-calculator .mx-cost-card {
  background: rgba(255, 255, 255, 0.06) !important;
  border: none !important;
}
.mx-calculator .mx-cost-card-value {
  color: #ffffff !important;
}
.mx-calculator .mx-cost-card-label {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix any generic white card/surface inside the calculator */
.mx-calculator .mx-card,
.mx-calculator .mx-panel,
.mx-calculator [class*="-card"]:not(.mx-btn-back) {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* Fix lead gate form inputs (Complete Missing Information) */
.mx-calculator .mx-lead-field input,
.mx-calculator .mx-lead-field select,
.mx-calculator .mx-lead-field textarea {
  background: rgba(255, 255, 255, 0.07) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}
.mx-calculator .mx-lead-field input::placeholder,
.mx-calculator .mx-lead-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.35) !important;
}

/* Fix the blank progress bar / empty white strip on step 2 */
.mx-calculator .mx-extract-summary:empty {
  display: none !important;
}

/* Intl-Tel-Input Solana Dark Theme Overrides */
.iti { width: 100%; display: block; }
.iti__country-list {
  background-color: var(--mx-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.iti__country-list .iti__country.iti__highlight {
  background-color: rgba(255, 255, 255, 0.05);
}
.iti__country-list .iti__divider {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.mx-calculator .mx-lead-field .iti input {
  width: 100% !important;
  padding-left: 95px !important;
  background: rgba(255, 255, 255, 0.07) !important;
  color: #ffffff !important;
  box-sizing: border-box !important;
}
.mx-calculator .mx-lead-field .iti__selected-dial-code {
  color: var(--mx-accent) !important;
}
.iti__selected-flag {
  background: transparent !important;
}

/* ======================================================
   CROSS-BROWSER PORTABILITY & RESPONSIVE FIXES
   ====================================================== */

/* Fix checkboxes scaling and appearance across Webkit/iOS and Mozilla */
.mx-cost-discount input[type="checkbox"] {
  -webkit-appearance: auto !important;
  -moz-appearance: auto !important;
  appearance: auto !important;
  accent-color: var(--mx-accent) !important;
  cursor: pointer;
  transform: scale(1.2);
  -webkit-transform: scale(1.2);
  -moz-transform: scale(1.2);
}

/* Select element vendor prefixes for iOS Safari invisible text fix */
.mx-calculator select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Flexible wrapping for cost lines to prevent mobile overflow */
.mx-calculator .mx-cost-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; 
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-top: 0.25rem;
}

.mx-calculator .mx-cost-line span {
  word-break: break-word;
}

/* Mobile specific responsive scaling */
@media (max-width: 480px) {
  .mx-calculator .mx-cost-line {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .mx-calculator .mx-cost-line.mx-cost-total {
    flex-direction: row;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 0.75rem;
    margin-top: 0.5rem;
  }

  .mx-calculator .mx-savings-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem;
  }
  
  .mx-calculator .mx-step-title {
    font-size: 1.6rem;
  }
}

/* ======================================================
   MOBILE RESPONSIVE — Solana Calculator
   Fixes overlapping, truncated cards, buttons, text
   Breakpoint: ≤ 600px (phones)
   ====================================================== */
@media (max-width: 600px) {

  /* ---- HEADER: shrink padding, hide nav labels ---- */
  .mx-calculator .mx-header {
    padding: 0.65rem 0.6rem !important;
    min-height: 60px !important;
  }

  #calc-lang-text {
    display: none !important;
  }

  .mx-calculator .mx-header-logo img {
    width: 32px !important;
    height: 32px !important;
  }

  .mx-calculator .mx-header-logo-name {
    font-size: 0.82rem !important;
  }

  .mx-calculator .mx-header-logo-sub {
    font-size: 0.58rem !important;
  }

  /* Hide step nav text labels — keep only dots */
  .mx-calculator .mx-nav-step span:not(.mx-nav-dot) {
    display: none !important;
  }

  .mx-calculator .mx-header-nav {
    position: static !important;
    transform: none !important;
    gap: 0.35rem !important;
  }

  .mx-calculator .mx-close-btn {
    width: 36px !important;
    height: 36px !important;
  }

  /* ---- BODY / STEP SECTIONS ---- */
  .mx-calculator .mx-step {
    padding: 1.5rem 1rem 5rem !important;
  }

  .mx-calculator .mx-step-container,
  .mx-calculator .mx-step-container--wide {
    padding: 0 !important;
    max-width: 100% !important;
  }

  /* ---- WELCOME / STEP 0 ---- */
  .mx-calculator .mx-step-container--welcome {
    padding: 1.5rem 1rem 2rem !important;
    min-height: 85dvh !important;
  }

  .mx-calculator .mx-welcome-heading {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.5rem !important;
  }

  .mx-calculator .mx-welcome-sub {
    font-size: 0.9rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* ---- SERVICE CARDS: stack vertically, full width ---- */
  .mx-calculator .mx-service-cards,
  .mx-service-cards {
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    width: 100% !important;
  }

  .mx-calculator .mx-service-card,
  .mx-service-card {
    flex-direction: row !important;
    text-align: left !important;
    padding: 1rem 1.25rem !important;
    gap: 1rem !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.04) !important;
    min-height: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .mx-calculator .mx-service-card.mx-selected {
    border-color: var(--mx-accent) !important;
    background: rgba(212,168,67,0.08) !important;
  }

  .mx-calculator .mx-service-card-body {
    flex: 1 !important;
    min-width: 0 !important;
  }

  .mx-calculator .mx-service-card-title {
    font-size: 0.95rem !important;
    white-space: normal !important;
    word-break: break-word !important;
  }

  .mx-calculator .mx-service-card-desc {
    font-size: 0.78rem !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: block !important;
  }

  .mx-calculator .mx-service-card-icon {
    width: 44px !important;
    height: 44px !important;
    flex-shrink: 0 !important;
  }

  /* ---- GET STARTED BUTTON ---- */
  .mx-calculator .mx-btn-get-started,
  .mx-btn-get-started {
    width: 100% !important;
    padding: 0.9rem 1.5rem !important;
    font-size: 0.9rem !important;
  }

  /* ---- PRIMARY BUTTONS ---- */
  .mx-calculator .mx-btn-primary {
    padding: 0.9rem 1.25rem !important;
    font-size: 0.9rem !important;
    touch-action: manipulation;
  }

  /* ---- BACK BUTTON ---- */
  .mx-calculator .mx-btn-back {
    font-size: 0.8rem !important;
    padding: 0.4rem 0.8rem !important;
  }

  /* ---- STEP TYPOGRAPHY ---- */
  .mx-calculator .mx-step-title {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
  }

  .mx-calculator .mx-step-subtitle {
    font-size: 0.88rem !important;
    line-height: 1.5 !important;
  }

  .mx-calculator .mx-step-badge {
    font-size: 0.7rem !important;
  }

  /* ---- INPUTS / SELECTS ---- */
  .mx-calculator input[type="text"],
  .mx-calculator input[type="email"],
  .mx-calculator input[type="tel"],
  .mx-calculator select {
    font-size: 1rem !important; /* Prevent iOS zoom on focus */
    padding: 0.8rem 1rem !important;
  }

  /* ---- ROOF OPTIONS / CHARGING TYPE CARDS ---- */
  .mx-calculator .mx-roof-option {
    padding: 0.9rem 1rem !important;
    font-size: 0.88rem !important;
  }

  /* ---- LEAD GATE FORM ---- */
  .mx-calculator .mx-lead-field label {
    font-size: 0.7rem !important;
  }

  .mx-calculator .mx-lead-field input {
    padding: 0.75rem 0.9rem !important;
    font-size: 1rem !important;
  }

  .mx-calculator .mx-lead-disclaimer {
    font-size: 0.68rem !important;
  }

  /* ---- HIDE CHATBOT BUTTON ON MOBILE (prevents overlap) ---- */
  #solania-trigger,
  .solania-trigger,
  [id*="jules"],
  [class*="chat-trigger"],
  [class*="chatbot-btn"],
  .solanIA-fab {
    display: none !important;
  }

  /* ---- FOOTER ---- */
  .mx-calculator .mx-footer {
    padding: 0.75rem 1rem !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    font-size: 0.72rem !important;
  }

  /* ---- EV WORKFLOW ---- */
  #mx-step-ev-a .mx-step-container,
  #mx-step-ev-b .mx-step-container,
  #mx-step-ev-c .mx-step-container {
    padding: 0 !important;
  }

  #mx-step-ev-b .mx-roof-option {
    flex-direction: column !important;
    gap: 0.4rem !important;
  }

  #mx-step-ev-b .mx-roof-option div[style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
  }

  /* Specific fix for Address Input Visibility & Margin */
  .mx-calculator .mx-address-input-wrapper {
    margin-top: 1rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .mx-calculator .mx-address-input {
    min-height: 50px !important;
    font-size: 16px !important; /* Forces 16px to prevent iOS zoom */
  }

  /* Ensure the confirmation button is prominent */
  #mx-btn-step1b {
    margin-top: 0.5rem !important;
    width: 100% !important;
    padding: 1rem !important;
  }
}

/* ---- Extra small phones (≤ 390px) ---- */
@media (max-width: 390px) {
  .mx-calculator .mx-welcome-heading {
    font-size: 1.5rem !important;
  }

  .mx-calculator .mx-step-title {
    font-size: 1.3rem !important;
  }

  .mx-calculator .mx-header {
    padding: 0.5rem 0.75rem !important;
  }
}
