/**
 * TecnoAndroid — tables-v1 additive polish (after main-v9).
 * Marker: --ta-table-wow:1 --ta-table-mobile:1
 * Works with .ta-table-shell from tables-v1.js.
 * Mobile: 2-col specs stack as cards; wide tables keep h-scroll.
 */
:root{--ta-table-wow:1;--ta-table-mobile:1}

/* Force real table layout even if older CSS set display:block.
 * Specs stack on mobile overrides this with higher-specificity rules below.
 */
.ta-article-content .ta-table-shell:not(.ta-table-shell--specs):not(.ta-table-shell--stack) table,
.entry-content .ta-table-shell:not(.ta-table-shell--specs):not(.ta-table-shell--stack) table,
.ta-entry-content .ta-table-shell:not(.ta-table-shell--specs):not(.ta-table-shell--stack) table,
.ta-article-content figure.wp-block-table:not(.ta-table-shell--specs) table,
.entry-content figure.wp-block-table:not(.ta-table-shell--specs) table{
  display:table !important;
}

/* Badge chip (injected by tables-v1.js) */
.ta-article-content .ta-table-badge,
.entry-content .ta-table-badge,
.ta-entry-content .ta-table-badge{
  position:absolute;
  top:10px;
  right:12px;
  z-index:5;
  font-family:var(--ta-font-heading, Poppins, Verdana, sans-serif);
  font-size:10px;
  font-weight:700;
  letter-spacing:.14em;
  color:#0B0E11;
  background:#D6FF3E;
  padding:4px 8px;
  border-radius:4px;
  line-height:1;
  pointer-events:none;
  box-shadow:0 4px 14px rgba(214,255,62,.35);
}

/* Heading above table */
.ta-article-content h2:has(+ .ta-table-shell),
.ta-article-content h2:has(+ figure.wp-block-table),
.ta-article-content h3:has(+ .ta-table-shell),
.ta-article-content h3:has(+ figure.wp-block-table),
.entry-content h2:has(+ .ta-table-shell),
.entry-content h2:has(+ figure.wp-block-table),
.entry-content h3:has(+ .ta-table-shell),
.entry-content h3:has(+ figure.wp-block-table){
  margin-bottom:10px;
  padding-left:12px;
  border-left:3px solid #D6FF3E;
}

/* 2-col specs: kill huge empty gap (desktop / tablet) */
.ta-article-content .ta-table-shell--specs table,
.entry-content .ta-table-shell--specs table,
.ta-article-content table.ta-table--specs,
.entry-content table.ta-table--specs{
  table-layout:fixed !important;
  min-width:100% !important;
}
.ta-article-content .ta-table-shell--specs th:first-child,
.ta-article-content .ta-table-shell--specs td:first-child,
.entry-content .ta-table-shell--specs th:first-child,
.entry-content .ta-table-shell--specs td:first-child,
.ta-article-content table.ta-table--specs th:first-child,
.ta-article-content table.ta-table--specs td:first-child,
.entry-content table.ta-table--specs th:first-child,
.entry-content table.ta-table--specs td:first-child{
  width:34%;
  max-width:240px;
}
.ta-article-content .ta-table-shell--specs tbody td:first-child,
.entry-content .ta-table-shell--specs tbody td:first-child,
.ta-article-content table.ta-table--specs tbody td:first-child,
.entry-content table.ta-table--specs tbody td:first-child{
  color:var(--ta-color-text-secondary, #4B5162) !important;
  font-weight:600 !important;
  font-size:13.5px;
}
.ta-article-content .ta-table-shell--specs tbody td:last-child,
.entry-content .ta-table-shell--specs tbody td:last-child,
.ta-article-content table.ta-table--specs tbody td:last-child,
.entry-content table.ta-table--specs tbody td:last-child{
  font-weight:650 !important;
  font-size:15.5px;
  color:var(--ta-color-text, #12151C) !important;
}
.ta-article-content .ta-table-shell--specs thead th:last-child,
.entry-content .ta-table-shell--specs thead th:last-child{
  padding-right:72px !important;
}

/* Soft entrance */
@media (prefers-reduced-motion:no-preference){
  .ta-article-content .ta-table-shell,
  .entry-content .ta-table-shell,
  .ta-article-content figure.wp-block-table,
  .entry-content figure.wp-block-table{
    animation:ta-table-wow-in .55s cubic-bezier(.22,1,.36,1) both;
  }
}
@keyframes ta-table-wow-in{
  from{opacity:.7;transform:translateY(12px)}
  to{opacity:1;transform:none}
}
@media (prefers-reduced-motion:reduce){
  .ta-article-content .ta-table-shell,
  .entry-content .ta-table-shell,
  .ta-article-content figure.wp-block-table,
  .entry-content figure.wp-block-table{animation:none !important}
}

@media (hover:hover) and (pointer:fine){
  .ta-article-content .ta-table-shell--specs tbody tr:hover td:last-child,
  .entry-content .ta-table-shell--specs tbody tr:hover td:last-child{
    color:#0B0E11 !important;
  }
}

/* ===== Mobile: stacked specs + compact chrome ===== */
@media (max-width:640px){
  /* Never force 520px tables on phones — was clipped by overflow-x:clip. */
  .ta-article-content table,
  .entry-content table,
  .ta-entry-content table,
  .ta-article-content .ta-table-scroll table,
  .entry-content .ta-table-scroll table,
  .ta-entry-content .ta-table-scroll table{
    min-width:0 !important;
    max-width:100% !important;
  }
  .ta-article-content .ta-table-shell,
  .entry-content .ta-table-shell,
  .ta-entry-content .ta-table-shell,
  .ta-article-content .wp-block-table,
  .entry-content .wp-block-table,
  .ta-entry-content .wp-block-table{
    max-width:100% !important;
    width:100% !important;
    box-sizing:border-box !important;
  }
  .ta-article-content .ta-table-scroll,
  .entry-content .ta-table-scroll,
  .ta-entry-content .ta-table-scroll{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    max-width:100%;
  }
  /* Wide (3+ col) tables: keep swipeable width inside the scroller only. */
  .ta-article-content .ta-table-shell:not(.ta-table-shell--specs):not(.ta-table-shell--stack) .ta-table-scroll table,
  .entry-content .ta-table-shell:not(.ta-table-shell--specs):not(.ta-table-shell--stack) .ta-table-scroll table,
  .ta-article-content .wp-block-table:not(.ta-table-shell--specs) .ta-table-scroll table,
  .entry-content .wp-block-table:not(.ta-table-shell--specs) .ta-table-scroll table{
    min-width:520px !important;
    width:auto !important;
    max-width:none !important;
  }

  .ta-article-content .ta-table-badge,
  .entry-content .ta-table-badge,
  .ta-entry-content .ta-table-badge{
    top:8px;
    right:8px;
    font-size:9px;
    padding:3px 6px;
  }

  /* Room for SPECS/DATA badge so it doesn't cover first row */
  .ta-article-content .ta-table-shell--specs,
  .entry-content .ta-table-shell--specs,
  .ta-article-content .ta-table-shell--stack,
  .entry-content .ta-table-shell--stack{
    padding-top:28px;
  }

  /* Stacked specs: each row = label + value card block (no h-scroll) */
  .ta-article-content .ta-table-shell--stack .ta-table-scroll,
  .entry-content .ta-table-shell--stack .ta-table-scroll,
  .ta-article-content .ta-table-shell--specs .ta-table-scroll,
  .entry-content .ta-table-shell--specs .ta-table-scroll,
  .ta-article-content .ta-table-shell--specs.ta-table-shell--stack .ta-table-scroll,
  .entry-content .ta-table-shell--specs.ta-table-shell--stack .ta-table-scroll{
    overflow-x:visible !important;
  }
  .ta-article-content .ta-table-shell--stack table,
  .entry-content .ta-table-shell--stack table,
  .ta-article-content table.ta-table--stack,
  .entry-content table.ta-table--stack,
  .ta-article-content .ta-table-shell--specs table,
  .entry-content .ta-table-shell--specs table,
  .ta-article-content table.ta-table--specs,
  .entry-content table.ta-table--specs{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100% !important;
    table-layout:auto !important;
  }
  .ta-article-content .ta-table-shell--stack thead,
  .entry-content .ta-table-shell--stack thead,
  .ta-article-content .ta-table-shell--specs thead,
  .entry-content .ta-table-shell--specs thead{
    display:none !important;
  }
  .ta-article-content .ta-table-shell--stack tbody,
  .entry-content .ta-table-shell--stack tbody,
  .ta-article-content .ta-table-shell--specs tbody,
  .entry-content .ta-table-shell--specs tbody,
  .ta-article-content .ta-table-shell--stack tr,
  .entry-content .ta-table-shell--stack tr,
  .ta-article-content .ta-table-shell--specs tr,
  .entry-content .ta-table-shell--specs tr{
    display:block !important;
    width:100%;
  }
  .ta-article-content .ta-table-shell--stack tbody tr,
  .entry-content .ta-table-shell--stack tbody tr,
  .ta-article-content .ta-table-shell--specs tbody tr,
  .entry-content .ta-table-shell--specs tbody tr{
    padding:11px 14px 12px 16px;
    border-bottom:1px solid color-mix(in srgb, var(--ta-color-border) 88%, transparent);
    background:transparent;
  }
  .ta-article-content .ta-table-shell--stack tbody tr:nth-child(even),
  .entry-content .ta-table-shell--stack tbody tr:nth-child(even),
  .ta-article-content .ta-table-shell--specs tbody tr:nth-child(even),
  .entry-content .ta-table-shell--specs tbody tr:nth-child(even){
    background:color-mix(in srgb, var(--ta-color-surface) 78%, transparent);
  }
  .ta-article-content .ta-table-shell--stack tbody tr:last-child,
  .entry-content .ta-table-shell--stack tbody tr:last-child,
  .ta-article-content .ta-table-shell--specs tbody tr:last-child,
  .entry-content .ta-table-shell--specs tbody tr:last-child{
    border-bottom:0;
  }
  .ta-article-content .ta-table-shell--stack th,
  .ta-article-content .ta-table-shell--stack td,
  .entry-content .ta-table-shell--stack th,
  .entry-content .ta-table-shell--stack td,
  .ta-article-content .ta-table-shell--specs th,
  .ta-article-content .ta-table-shell--specs td,
  .entry-content .ta-table-shell--specs th,
  .entry-content .ta-table-shell--specs td,
  .ta-article-content table.ta-table--stack th,
  .ta-article-content table.ta-table--stack td,
  .entry-content table.ta-table--stack th,
  .entry-content table.ta-table--stack td,
  .ta-article-content table.ta-table--specs th,
  .ta-article-content table.ta-table--specs td,
  .entry-content table.ta-table--specs th,
  .entry-content table.ta-table--specs td{
    display:block !important;
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
    min-height:0 !important;
    position:static !important;
    left:auto !important;
    box-shadow:none !important;
    border:0 !important;
    padding:0 !important;
    text-align:left !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    word-break:break-word;
  }
  /* Label */
  .ta-article-content .ta-table-shell--stack tbody td:first-child,
  .ta-article-content .ta-table-shell--stack tbody th:first-child,
  .entry-content .ta-table-shell--stack tbody td:first-child,
  .entry-content .ta-table-shell--stack tbody th:first-child,
  .ta-article-content .ta-table-shell--specs tbody td:first-child,
  .ta-article-content .ta-table-shell--specs tbody th:first-child,
  .entry-content .ta-table-shell--specs tbody td:first-child,
  .entry-content .ta-table-shell--specs tbody th:first-child,
  .ta-article-content table.ta-table--specs tbody td:first-child,
  .entry-content table.ta-table--specs tbody td:first-child{
    font-size:11px !important;
    font-weight:700 !important;
    letter-spacing:.04em;
    text-transform:uppercase;
    line-height:1.35;
    color:var(--ta-color-text-secondary, #4B5162) !important;
    margin:0 0 4px;
    padding:0 !important;
  }
  /* Value */
  .ta-article-content .ta-table-shell--stack tbody td:last-child,
  .entry-content .ta-table-shell--stack tbody td:last-child,
  .ta-article-content .ta-table-shell--specs tbody td:last-child,
  .entry-content .ta-table-shell--specs tbody td:last-child,
  .ta-article-content table.ta-table--specs tbody td:last-child,
  .entry-content table.ta-table--specs tbody td:last-child{
    font-size:14.5px !important;
    font-weight:650 !important;
    line-height:1.4;
    color:var(--ta-color-text, #12151C) !important;
    padding:0 !important;
  }
  /* Single-cell rows (rare) still readable */
  .ta-article-content .ta-table-shell--stack tbody td:only-child,
  .entry-content .ta-table-shell--stack tbody td:only-child,
  .ta-article-content .ta-table-shell--specs tbody td:only-child,
  .entry-content .ta-table-shell--specs tbody td:only-child{
    font-size:14px !important;
    text-transform:none;
    letter-spacing:0;
    font-weight:600 !important;
  }

  /* Hide scroll chrome on stacked specs */
  .ta-article-content .ta-table-shell--stack.is-scrollable::after,
  .entry-content .ta-table-shell--stack.is-scrollable::after,
  .ta-article-content .ta-table-shell--stack .ta-table-hint,
  .entry-content .ta-table-shell--stack .ta-table-hint{
    display:none !important;
    opacity:0 !important;
  }
}

[data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody td:first-child,
[data-theme="dark"] .entry-content .ta-table-shell--specs tbody td:first-child,
.ta-dark .ta-article-content .ta-table-shell--specs tbody td:first-child,
.ta-dark .entry-content .ta-table-shell--specs tbody td:first-child{
  color:#9AA0AC !important;
}
[data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody td:last-child,
[data-theme="dark"] .entry-content .ta-table-shell--specs tbody td:last-child,
.ta-dark .ta-article-content .ta-table-shell--specs tbody td:last-child,
.ta-dark .entry-content .ta-table-shell--specs tbody td:last-child{
  color:#F5F6F2 !important;
}
@media (hover:hover) and (pointer:fine){
  [data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody tr:hover td:last-child,
  [data-theme="dark"] .entry-content .ta-table-shell--specs tbody tr:hover td:last-child,
  .ta-dark .ta-article-content .ta-table-shell--specs tbody tr:hover td:last-child,
  .ta-dark .entry-content .ta-table-shell--specs tbody tr:hover td:last-child{
    color:#0B0E11 !important;
  }
}

@media (max-width:640px){
  [data-theme="dark"] .ta-article-content .ta-table-shell--stack tbody tr:nth-child(even),
  [data-theme="dark"] .entry-content .ta-table-shell--stack tbody tr:nth-child(even),
  [data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody tr:nth-child(even),
  [data-theme="dark"] .entry-content .ta-table-shell--specs tbody tr:nth-child(even),
  .ta-dark .ta-article-content .ta-table-shell--stack tbody tr:nth-child(even),
  .ta-dark .entry-content .ta-table-shell--stack tbody tr:nth-child(even),
  .ta-dark .ta-article-content .ta-table-shell--specs tbody tr:nth-child(even),
  .ta-dark .entry-content .ta-table-shell--specs tbody tr:nth-child(even){
    background:rgba(255,255,255,.04);
  }
  [data-theme="dark"] .ta-article-content .ta-table-shell--stack tbody td:first-child,
  [data-theme="dark"] .entry-content .ta-table-shell--stack tbody td:first-child,
  [data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody td:first-child,
  [data-theme="dark"] .entry-content .ta-table-shell--specs tbody td:first-child,
  .ta-dark .ta-article-content .ta-table-shell--stack tbody td:first-child,
  .ta-dark .entry-content .ta-table-shell--stack tbody td:first-child,
  .ta-dark .ta-article-content .ta-table-shell--specs tbody td:first-child,
  .ta-dark .entry-content .ta-table-shell--specs tbody td:first-child{
    color:#9AA0AC !important;
  }
  [data-theme="dark"] .ta-article-content .ta-table-shell--stack tbody td:last-child,
  [data-theme="dark"] .entry-content .ta-table-shell--stack tbody td:last-child,
  [data-theme="dark"] .ta-article-content .ta-table-shell--specs tbody td:last-child,
  [data-theme="dark"] .entry-content .ta-table-shell--specs tbody td:last-child,
  .ta-dark .ta-article-content .ta-table-shell--stack tbody td:last-child,
  .ta-dark .entry-content .ta-table-shell--stack tbody td:last-child,
  .ta-dark .ta-article-content .ta-table-shell--specs tbody td:last-child,
  .ta-dark .entry-content .ta-table-shell--specs tbody td:last-child{
    color:#F5F6F2 !important;
  }
}
