/* MTech-67 - Bosch ECU search page (OBDBDM widget wrapper) */

.page-bosch-ecu-search #wrapper { padding-top: 0; }

.mtech-obd {
  --obd-bg: #0d1117;
  --obd-card: #161b22;
  --obd-line: #2a313c;
  --obd-text: #e6edf3;
  --obd-muted: #9aa4b2;
  --obd-blue: #1c69d4;
  --obd-m1: #81c4ff;
  --obd-m2: #16588e;
  --obd-m3: #e7222e;
  max-width: 1100px;
  margin: 24px auto 48px;
  padding: 0 16px;
  color: var(--obd-text);
}

.mtech-obd__hero {
  position: relative;
  background: linear-gradient(135deg, #0d1117 0%, #111a26 60%, #0f2744 100%);
  border: 1px solid var(--obd-line);
  border-radius: 14px 14px 0 0;
  padding: 36px 32px 28px;
  overflow: hidden;
}

.mtech-obd__stripes {
  position: absolute; top: 0; left: 0; right: 0;
  display: flex; height: 4px;
}
.mtech-obd__stripes span { flex: 1; }
.mtech-obd__stripes span:nth-child(1) { background: var(--obd-m1); }
.mtech-obd__stripes span:nth-child(2) { background: var(--obd-m2); }
.mtech-obd__stripes span:nth-child(3) { background: var(--obd-m3); }

.mtech-obd__eyebrow {
  margin: 0 0 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  color: var(--obd-m1);
}
.mtech-obd__title {
  margin: 0 0 12px;
  font-size: 32px; line-height: 1.15; font-weight: 800;
  color: #fff; text-transform: none;
}
.mtech-obd__intro {
  margin: 0 0 20px; max-width: 680px;
  font-size: 16px; line-height: 1.55; color: var(--obd-muted);
}

.mtech-obd__hints {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 0; padding: 0; list-style: none;
}
.mtech-obd__hints li {
  padding: 7px 12px;
  border: 1px solid var(--obd-line); border-radius: 999px;
  background: rgba(255,255,255,.03);
  font-size: 13px; color: var(--obd-muted);
}
.mtech-obd__hints strong {
  color: #fff; margin-right: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mtech-obd__card {
  background: var(--obd-card);
  border: 1px solid var(--obd-line); border-top: 0;
  border-radius: 0 0 14px 14px;
  padding: 24px;
  min-height: 420px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.mtech-obd__frame {
  display: block; width: 100%; border: 0;
  border-radius: 10px; background: transparent;
}

.mtech-obd__widget { position: relative; min-height: 380px; }

/* Loader until the widget renders */
.mtech-obd__loader {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .3s;
}
.mtech-obd__loader span {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid var(--obd-line); border-top-color: var(--obd-blue);
  animation: mtech-obd-spin .8s linear infinite;
}
.mtech-obd__widget.is-ready .mtech-obd__loader { opacity: 0; pointer-events: none; }

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

@media (max-width: 767px) {
  .mtech-obd { margin-top: 12px; padding: 0 12px; }
  .mtech-obd__hero { padding: 28px 18px 22px; }
  .mtech-obd__title { font-size: 24px; }
  .mtech-obd__intro { font-size: 15px; }
  .mtech-obd__card { padding: 14px; }
}

/* =========================================================
   MOBILE v2 — compact, full width, no nested frames
   ========================================================= */
@media (max-width: 768px) {
  /* theme wrappers around the page content: flatten them on our pages only */
  body.page-mtech-obd #content-wrapper { padding: 0 !important; }
  body.page-mtech-obd #main,
  body.page-mtech-obd #content,
  body.page-mtech-obd #wrapper,
  body.page-mtech-obd .page-content,
  body.page-mtech-obd #content-wrapper > section,
  body.page-mtech-obd #content-wrapper > div {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  /* more specific than the flatten rules above, so our padding wins */
  body.page-mtech-obd #content-wrapper .mtech-obd,
  .mtech-obd { margin: 0 !important; padding: 12px 10px 20px !important; max-width: 100% !important; }

  /* hero: compact */
  .mtech-obd__hero {
    padding: 20px 16px 16px !important;
    border-radius: 14px !important;
  }
  .mtech-obd__eyebrow { font-size: 10px !important; letter-spacing: .12em; margin-bottom: 6px; }
  .mtech-obd__title { font-size: 21px !important; line-height: 1.2; margin-bottom: 8px; }
  .mtech-obd__intro { font-size: 13.5px !important; line-height: 1.5; margin-bottom: 14px; }

  /* hints: one line, horizontal scroll if needed */
  .mtech-obd__hints {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 8px !important;
    margin: 0 -16px !important;
    padding: 0 16px 2px !important;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mtech-obd__hints::-webkit-scrollbar { display: none; }
  .mtech-obd__hints li {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 11px !important;
    padding: 5px 9px !important;
  }
  .mtech-obd__hints strong { margin-right: 4px !important; }

  /* widget: no extra frame, full width, separated from hero */
  .mtech-obd__card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin-top: 12px;
    min-height: 0 !important;
  }
  .mtech-obd__widget { min-height: 320px; }
  .mtech-obd__widget iframe { width: 100% !important; max-width: 100% !important; }
}
