/* TecDoc Widget v10.0 — Autodoc-inspired redesign
   Tabs: פרטים טכניים | התאמה לרכבים | מספרי OE
   RTL Hebrew, Heebo font — Clean, modern, Autodoc-style layout */

/* Note: Heebo font is loaded by the parent page — no @import needed here */

/* ── Reset ── */
#tecdoc-widget *,
#tecdoc-widget *::before,
#tecdoc-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Override Konimbo parent table styles */
#tecdoc-widget table,
#tecdoc-widget table tr,
#tecdoc-widget table td,
#tecdoc-widget table th {
  border: none !important;
  background: none !important;
  border-spacing: 0 !important;
  box-shadow: none !important;
}

/* Override Konimbo parent container styles */
.specifications #tecdoc-widget,
#item_content #tecdoc-widget {
  margin: 0 !important;
  padding: 0 !important;
}

#item_content.item_attributes {
  padding: 0 !important;
}

#item_content .specifications {
  margin: 0 !important;
  padding: 0 !important;
}

#item_content #item_content_title,
#item_content > h3 {
  display: none !important;
}

/* Hide Konimbo empty tables/divs */
.specifications > table:not(#tecdoc-widget *),
.specifications > div:empty:not(#tecdoc-widget) {
  display: none !important;
}

#tecdoc-widget {
  font-family: 'Heebo', Arial, Helvetica, sans-serif;
  direction: rtl;
  text-align: right;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #fff;
  max-width: 100%;
}

/* ═══════════════════════════════════
   TABS — Autodoc-style clean navigation
   ═══════════════════════════════════ */
#tecdoc-widget .tw-tabs {
  display: flex;
  border-bottom: 1px solid #e5e5e5;
  gap: 0;
  margin: 0;
  padding: 0;
  background: #fff;
}

#tecdoc-widget .tw-tab {
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
  user-select: none;
  text-align: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
}

#tecdoc-widget .tw-tab:hover {
  color: #1a1a1a;
}

#tecdoc-widget .tw-tab-active {
  color: #1a1a1a;
  font-weight: 600;
}

#tecdoc-widget .tw-tab-active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  right: 0;
  left: 0;
  height: 2px;
  background: #1a1a1a;
}

/* ═══════════════════════════════════
   PANELS — Tab content
   ═══════════════════════════════════ */
#tecdoc-widget .tw-panel {
  display: none;
  padding: 0;
}

#tecdoc-widget .tw-panel-active {
  display: block;
}

/* ═══════════════════════════════════
   SPECS TABLE — Autodoc-style clean layout
   ═══════════════════════════════════ */
#tecdoc-widget .tw-specs-table {
  width: 100% !important;
  border-collapse: collapse !important;
  table-layout: fixed !important;
  margin-top: 8px;
}

#tecdoc-widget .tw-specs-table tr {
  border: none !important;
  height: auto !important;
}

#tecdoc-widget .tw-specs-table td {
  padding: 11px 0 !important;
  font-size: 15px !important;
  border: none !important;
  vertical-align: top !important;
  line-height: 1.45 !important;
  background: transparent !important;
}

#tecdoc-widget .tw-specs-table td:first-child {
  color: #555 !important;
  font-weight: 400 !important;
  width: 40% !important;
  padding-left: 4px !important;
}

#tecdoc-widget .tw-specs-table td:last-child {
  color: #1a1a1a !important;
  font-weight: 500 !important;
  width: 60% !important;
}

/* Row separators — subtle like Autodoc */
#tecdoc-widget .tw-specs-table tr + tr td {
  border-top: 1px solid #f0f0f0 !important;
}

/* Hidden rows for More/Less */
#tecdoc-widget .tw-specs-table tr.tw-spec-hidden {
  display: none;
}

#tecdoc-widget .tw-specs-table.tw-expanded tr.tw-spec-hidden {
  display: table-row;
}

/* More / Less button — Autodoc style */
#tecdoc-widget .tw-more-wrap {
  text-align: center;
  padding: 6px 0 10px;
}

#tecdoc-widget .tw-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: #1B4E91;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  transition: color 0.2s;
}

#tecdoc-widget .tw-more-btn:hover {
  color: #143d73;
  text-decoration: underline;
}

#tecdoc-widget .tw-more-btn .tw-arrow {
  font-size: 9px;
  transition: transform 0.25s;
}

#tecdoc-widget .tw-more-btn.tw-expanded .tw-arrow {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════
   VEHICLE COMPATIBILITY — Accordion
   ═══════════════════════════════════ */
#tecdoc-widget .tw-accordion {
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 10px;
  max-height: 420px;
  overflow-y: auto;
}

#tecdoc-widget .tw-accordion::-webkit-scrollbar {
  width: 4px;
}

#tecdoc-widget .tw-accordion::-webkit-scrollbar-track {
  background: #f5f5f5;
}

#tecdoc-widget .tw-accordion::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 2px;
}

/* Level 1: Manufacturer */
#tecdoc-widget .tw-acc-l1 {
  border-bottom: 1px solid #f0f0f0;
}

#tecdoc-widget .tw-acc-l1:last-child {
  border-bottom: none;
}

#tecdoc-widget .tw-acc-l1-header {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  background: #fff;
  transition: background 0.15s;
  gap: 8px;
  user-select: none;
}

#tecdoc-widget .tw-acc-l1-header:hover {
  background: #fafafa;
}

#tecdoc-widget .tw-acc-icon {
  font-size: 16px;
  font-weight: 400;
  color: #1B4E91;
  width: 18px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  font-family: Arial, Helvetica, sans-serif;
}

#tecdoc-widget .tw-acc-l1-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

#tecdoc-widget .tw-acc-l1-body {
  display: none;
}

#tecdoc-widget .tw-acc-l1.tw-open > .tw-acc-l1-body {
  display: block;
}

/* Level 2: Model */
#tecdoc-widget .tw-acc-l2 {
  border-bottom: 1px solid #f5f5f5;
}

#tecdoc-widget .tw-acc-l2:last-child {
  border-bottom: none;
}

#tecdoc-widget .tw-acc-l2-header {
  display: flex;
  align-items: center;
  padding: 9px 14px;
  padding-right: 36px;
  cursor: pointer;
  background: #fafafa;
  gap: 8px;
  user-select: none;
  transition: background 0.15s;
}

#tecdoc-widget .tw-acc-l2-header:hover {
  background: #f5f5f5;
}

#tecdoc-widget .tw-acc-l2-name {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

#tecdoc-widget .tw-acc-l2-years {
  font-size: 13px;
  color: #888;
  font-weight: 400;
  margin-right: 4px;
}

#tecdoc-widget .tw-acc-l2-body {
  display: none;
}

#tecdoc-widget .tw-acc-l2.tw-open > .tw-acc-l2-body {
  display: block;
}

/* Level 3: Engine */
#tecdoc-widget .tw-acc-l3 {
  padding: 7px 14px;
  padding-right: 52px;
  font-size: 13px;
  color: #555;
  border-bottom: 1px solid #fafafa;
  display: flex;
  align-items: center;
  gap: 6px;
}

#tecdoc-widget .tw-acc-l3:last-child {
  border-bottom: none;
}

#tecdoc-widget .tw-acc-l3-years {
  color: #999;
  font-size: 12px;
}

#tecdoc-widget .tw-acc-l3-separator {
  color: #ccc;
}

/* ═══════════════════════════════════
   OE NUMBERS
   ═══════════════════════════════════ */
#tecdoc-widget .tw-oe-subtitle {
  font-size: 13px;
  color: #777;
  padding: 10px 0 4px;
  line-height: 1.5;
}

#tecdoc-widget .tw-oe-acc-item {
  padding: 6px 14px;
  padding-right: 36px;
  font-size: 14px;
  color: #333;
  font-weight: 400;
  font-family: 'Heebo', Arial, sans-serif;
  border-bottom: 1px solid #fafafa;
}

#tecdoc-widget .tw-oe-acc-item:last-child {
  border-bottom: none;
}

#tecdoc-widget .tw-oe-info {
  font-size: 12px;
  color: #999;
  padding: 10px 14px;
  line-height: 1.5;
  background: #fafafa;
  border-radius: 4px;
  margin-top: 8px;
}

/* ═══════════════════════════════════
   EMPTY & FOOTER
   ═══════════════════════════════════ */
#tecdoc-widget .tw-empty {
  padding: 24px 16px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

#tecdoc-widget .tw-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #bbb;
  padding: 8px 0 2px;
}

/* ═══════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════ */
@media (max-width: 768px) {
  #tecdoc-widget .tw-tab {
    padding: 10px 14px;
    font-size: 14px;
  }

  #tecdoc-widget .tw-specs-table td {
    padding: 9px 0 !important;
    font-size: 14px !important;
  }

  #tecdoc-widget .tw-specs-table td:first-child {
    padding-left: 4px !important;
  }

  #tecdoc-widget .tw-acc-l1-header {
    padding: 9px 12px;
  }

  #tecdoc-widget .tw-acc-l1-name {
    font-size: 14px;
  }

  #tecdoc-widget .tw-acc-l2-header {
    padding-right: 30px;
    padding-left: 12px;
  }

  #tecdoc-widget .tw-acc-l2-name {
    font-size: 13px;
  }

  #tecdoc-widget .tw-acc-l3 {
    padding-right: 46px;
    padding-left: 12px;
    font-size: 12px;
  }

  #tecdoc-widget .tw-oe-acc-item {
    padding-right: 30px;
    font-size: 13px;
  }
}

/* ═══════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════ */
@media (max-width: 480px) {
  #tecdoc-widget {
    font-size: 14px;
  }

  #tecdoc-widget .tw-tabs {
    gap: 0;
  }

  #tecdoc-widget .tw-tab {
    padding: 10px 10px;
    font-size: 14px;
    flex: 1;
  }

  #tecdoc-widget .tw-specs-table td {
    padding: 9px 0 !important;
    font-size: 14px !important;
  }

  #tecdoc-widget .tw-specs-table td:first-child {
    width: 42% !important;
    padding-left: 2px !important;
  }

  #tecdoc-widget .tw-acc-l1-header {
    padding: 9px 10px;
  }

  #tecdoc-widget .tw-acc-l1-name {
    font-size: 14px;
  }

  #tecdoc-widget .tw-acc-l2-header {
    padding-right: 26px;
    padding-left: 10px;
  }

  #tecdoc-widget .tw-acc-l2-name {
    font-size: 13px;
  }

  #tecdoc-widget .tw-acc-l3 {
    padding-right: 40px;
    padding-left: 10px;
    font-size: 12px;
  }

  #tecdoc-widget .tw-oe-acc-item {
    padding-right: 26px;
    font-size: 13px;
  }

  #tecdoc-widget .tw-oe-info {
    font-size: 11px;
    padding: 8px 10px;
  }

  #tecdoc-widget .tw-strengths {
    padding: 12px 14px;
  }
  #tecdoc-widget .tw-strength-item {
    padding: 10px 0;
  }
  #tecdoc-widget .tw-strength-icon svg {
    width: 22px;
    height: 22px;
  }
  #tecdoc-widget .tw-strength-text {
    font-size: 14px;
  }
}

/* ══ PURCHASE ROW ══ */
.tw-purchase-row {
  display: flex !important;
  align-items: stretch !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  direction: rtl !important;
  margin-top: 8px !important;
  width: 100% !important;
  max-width: 420px !important;
}

.tw-purchase-row a,
.tw-purchase-row .tw-cart-btn {
  background: #1B4E91 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  height: 48px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex: 1 !important;
  padding: 0 16px !important;
  text-decoration: none !important;
  font-family: 'Heebo', sans-serif !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.tw-qty-selector {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  border: 1px solid #e0e0e0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  height: 48px !important;
  min-width: 110px !important;
  background: #fff !important;
}

.tw-qty-selector span {
  width: 36px !important;
  height: 100% !important;
  border: none !important;
  background: transparent !important;
  font-size: 20px !important;
  cursor: pointer !important;
  color: #333 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  user-select: none !important;
  flex-shrink: 0 !important;
}

.tw-qty-selector input {
  width: 38px !important;
  height: 100% !important;
  text-align: center !important;
  border: none !important;
  border-right: 1px solid #e5e5e5 !important;
  border-left: 1px solid #e5e5e5 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #333 !important;
  background: #fff !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  -moz-appearance: textfield !important;
}

@media (max-width: 480px) {
  .tw-purchase-row {
    max-width: 100% !important;
  }
  .tw-purchase-row a,
  .tw-purchase-row .tw-cart-btn {
    font-size: 15px !important;
    height: 44px !important;
    padding: 0 12px !important;
  }
  .tw-qty-selector {
    height: 44px !important;
    min-width: 100px !important;
  }
  .tw-qty-selector span {
    width: 32px !important;
    font-size: 18px !important;
  }
  .tw-qty-selector input {
    width: 34px !important;
    font-size: 14px !important;
  }
}

/* ══ BRAND INFO / ABOUT MANUFACTURER ══ */
#tecdoc-widget .tw-brand-info {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f8f9fb;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
}

#tecdoc-widget .tw-brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#tecdoc-widget .tw-brand-badge {
  display: inline-block;
  background: #1B4E91;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#tecdoc-widget .tw-brand-name {
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
}

#tecdoc-widget .tw-brand-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

#tecdoc-widget .tw-brand-since {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}

/* ══ STRENGTHS / USP LIST ══ */
#tecdoc-widget .tw-strengths {
  display: flex;
  flex-direction: column;
  background: #f8f9fb;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 10px;
  margin-bottom: 16px;
}

#tecdoc-widget .tw-strength-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f5;
}

#tecdoc-widget .tw-strength-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

#tecdoc-widget .tw-strength-item:first-child {
  padding-top: 0;
}

#tecdoc-widget .tw-strength-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tecdoc-widget .tw-strength-icon svg {
  width: 22px;
  height: 22px;
  color: #1B4E91;
  stroke: #1B4E91;
}

#tecdoc-widget .tw-strength-text {
  font-size: 14px;
  font-weight: 400;
  color: #444;
  font-family: 'Heebo', Arial, sans-serif;
  line-height: 1.4;
}
