.gtsc-app{--gtsc-accent:#174c70;--gtsc-label-width:170px;--gtsc-product-width:205px;--gtsc-border-color:#d3dee6;--gtsc-font-size:14px;--gtsc-image-width:90px;max-width:100%;margin:1.4em 0;font:inherit;color:inherit;line-height:1.5}
.gtsc-app *{box-sizing:border-box}
.gtsc-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
.gtsc-heading{margin-right:8px;font-size:1.13em}
.gtsc-toolbar label{font-size:.9em;display:flex;align-items:center;gap:5px}
.gtsc-count{font-size:.85em;opacity:.75;margin-left:auto}
.gtsc-app button{cursor:pointer;border:1px solid #b8c7d0;border-radius:5px;background:#fff;color:#233744;padding:7px 11px;font:inherit;line-height:1.25;min-height:34px}
.gtsc-app button:focus-visible,.gtsc-app input:focus-visible,.gtsc-app select:focus-visible{outline:3px solid #ffbf47;outline-offset:2px}
.gtsc-app button:disabled{opacity:.45;cursor:default}
.gtsc-app .gtsc-add{background:var(--gtsc-accent);border-color:var(--gtsc-accent);color:#fff}
.gtsc-picker{background:#f8fafc;border:1px solid #d5dfe7;border-radius:10px;padding:16px;margin:0 0 14px}
.gtsc-picker[hidden]{display:none!important}
.gtsc-picker-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
.gtsc-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(110px,1fr));gap:10px;margin-bottom:12px}
.gtsc-filter-grid label,.gtsc-picker>label{display:block;font-size:.85em;font-weight:600}
.gtsc-filter-grid select,.gtsc-filter-grid input[type="search"],.gtsc-picker input[type="search"]{display:block;width:100%;font:inherit;padding:8px;background:#fff;color:#152b3d;border:1px solid #becbd6;border-radius:5px;margin-top:5px;min-height:39px}
.gtsc-results{max-height:370px;overflow:auto;margin-top:10px;border-top:1px solid #dbe3e9}
.gtsc-result{display:flex;gap:12px;align-items:center;padding:9px 2px;border-bottom:1px solid #dbe3e9}
.gtsc-result>img{width:48px;height:48px;object-fit:contain;flex-shrink:0}
.gtsc-result-main{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.gtsc-result-main strong{font-size:.93em;overflow-wrap:anywhere}
.gtsc-result-main small{color:#586977;font-size:.76em}
.gtsc-pages{display:flex;justify-content:center;align-items:center;gap:12px;padding-top:12px;font-size:.86em}
.gtsc-table-wrap{max-width:100%;overflow:auto;border:1px solid var(--gtsc-border-color);border-radius:8px;background:#fff;scrollbar-gutter:auto}
.gtsc-spec-table{border-collapse:separate;border-spacing:0;table-layout:fixed;min-width:100%;width:max-content;max-width:none;color:#243443;background:#fff;margin:0}
.gtsc-spec-table th,.gtsc-spec-table td{box-sizing:border-box;width:var(--gtsc-product-width);min-width:var(--gtsc-product-width);max-width:var(--gtsc-product-width);border:0;border-bottom:1px solid #e1e8ee;padding:12px;vertical-align:top;font-size:var(--gtsc-font-size);text-align:left;overflow-wrap:anywhere;line-height:1.5}
.gtsc-spec-table .gtsc-label-cell{width:var(--gtsc-label-width);min-width:var(--gtsc-label-width);max-width:var(--gtsc-label-width);position:sticky;left:0;z-index:2;background:#f5f8fa;font-weight:600;box-shadow:1px 0 0 #dbe3e9}
.gtsc-spec-table thead th{background:#f0f5f8;vertical-align:top}
.gtsc-spec-table thead .gtsc-label-cell{z-index:4}
.gtsc-product-cell img{display:block;width:var(--gtsc-image-width);height:var(--gtsc-image-width);object-fit:contain;margin:0 0 8px}
.gtsc-product-link{display:block;font-weight:700;color:var(--gtsc-accent);text-decoration:underline;text-underline-offset:2px}
.gtsc-product-sub{display:block;font-weight:400;margin-top:5px;color:#546779;line-height:1.4}
.gtsc-column-actions{display:flex;align-items:center;gap:4px;margin-top:10px;flex-wrap:wrap}
.gtsc-column-actions .gtsc-move{padding:3px 8px;min-height:27px;font-size:.85em}
.gtsc-column-actions .gtsc-remove{padding:3px 7px;min-height:27px;color:#8c3440;font-size:.79em}
.gtsc-group-row>th{position:relative!important;left:auto!important;background:#e7eff4!important;font-weight:700!important;width:auto!important;max-width:none!important;min-width:0!important;z-index:1;padding:8px 12px}
.gtsc-group-toggle{background:transparent!important;border:none!important;font-weight:700!important;padding:3px 0!important;min-height:24px!important}
.gtsc-spec-table td.gtsc-best-value{background:#e9f7ed!important;color:#1b6536;font-weight:700}
.gtsc-note{font-size:.82em;color:#586e80;margin:9px 0}.gtsc-status{font-size:.85em;min-height:1em}
@media(max-width:650px){.gtsc-filter-grid{grid-template-columns:1fr 1fr}.gtsc-spec-table th,.gtsc-spec-table td{padding:9px}.gtsc-app{--gtsc-label-width:120px;--gtsc-product-width:160px}.gtsc-product-cell img{width:65px;height:65px}.gtsc-toolbar{align-items:flex-start}.gtsc-count{margin-left:0}}
@media(max-width:400px){.gtsc-filter-grid{grid-template-columns:1fr}}

/*
 * Table layout protection (beta.2)
 * Some themes convert table/thead/tr/th/td into block elements at mobile widths.
 * Such rules stack products vertically and prevent horizontal comparison.
 * Keep the native table layout inside this widget only, and scroll its container.
 */
.gtsc-app .gtsc-table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.gtsc-app .gtsc-table {
  min-width: 0;
  width: 100%;
}
.gtsc-app .gtsc-spec-table {
  display: table !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: fixed !important;
  margin: 0 !important;
}
.gtsc-app .gtsc-spec-table thead {
  display: table-header-group !important;
}
.gtsc-app .gtsc-spec-table tbody {
  display: table-row-group !important;
}
.gtsc-app .gtsc-spec-table tr {
  display: table-row !important;
  float: none !important;
}
.gtsc-app .gtsc-spec-table th,
.gtsc-app .gtsc-spec-table td {
  display: table-cell !important;
  float: none !important;
  clear: none !important;
  white-space: normal;
  vertical-align: top;
}
.gtsc-app .gtsc-spec-table th.gtsc-label-cell,
.gtsc-app .gtsc-spec-table td.gtsc-label-cell {
  width: var(--gtsc-label-width) !important;
  min-width: var(--gtsc-label-width) !important;
  max-width: var(--gtsc-label-width) !important;
}
.gtsc-app .gtsc-spec-table th.gtsc-product-cell,
.gtsc-app .gtsc-spec-table tbody tr:not(.gtsc-group-row) > td {
  width: var(--gtsc-product-width) !important;
  min-width: var(--gtsc-product-width) !important;
  max-width: var(--gtsc-product-width) !important;
}
.gtsc-app .gtsc-spec-table .gtsc-group-row > th {
  display: table-cell !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
@media (max-width: 650px) {
  /* Maintain compact mobile columns even if theme styles override table cells. */
  .gtsc-app .gtsc-spec-table th,
  .gtsc-app .gtsc-spec-table td { padding: 9px; }
}

/* Each category may have zero or any number of search fields. */
.gtsc-filter-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr))}
@media(max-width:650px){.gtsc-filter-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr))}}

/* beta.10: self-contained appearance controls; values are scoped to each comparison widget. */
.gtsc-app {
  --gtsc-text:#243443;--gtsc-button-text:#fff;--gtsc-surface:#fff;
  --gtsc-header-bg:#f0f5f8;--gtsc-label-bg:#f5f8fa;--gtsc-group-bg:#e7eff4;
  --gtsc-panel-bg:#f8fafc;--gtsc-best-bg:#e9f7ed;--gtsc-best-text:#1b6536;
  --gtsc-mobile-label-width:120px;--gtsc-mobile-product-width:160px;--gtsc-button-radius:7px;
  color:var(--gtsc-text);
}
.gtsc-app .gtsc-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.gtsc-app .gtsc-heading{flex:0 1 auto;color:var(--gtsc-text);margin:0;font-size:1.14em}
.gtsc-app .gtsc-toolbar-controls{display:flex;align-items:center;flex:1 1 360px;flex-wrap:wrap;gap:10px}
.gtsc-app.gtsc-layout-stacked .gtsc-heading{flex-basis:100%}
.gtsc-app.gtsc-layout-stacked .gtsc-toolbar-controls{flex-basis:100%}
.gtsc-app.gtsc-controls-left .gtsc-toolbar-controls{justify-content:flex-start}
.gtsc-app.gtsc-controls-center .gtsc-toolbar-controls{justify-content:center}
.gtsc-app.gtsc-controls-right .gtsc-toolbar-controls{justify-content:flex-end}
.gtsc-app .gtsc-count{margin-left:0}
.gtsc-app .gtsc-toolbar-controls label[hidden],.gtsc-app .gtsc-toolbar-controls span[hidden]{display:none!important}
.gtsc-app button{border-radius:var(--gtsc-button-radius)}
.gtsc-app .gtsc-add,.gtsc-app .gtsc-result-add:not(:disabled){
  background:var(--gtsc-accent);border-color:var(--gtsc-accent);color:var(--gtsc-button-text);
}
.gtsc-app.gtsc-button-outline .gtsc-add,.gtsc-app.gtsc-button-outline .gtsc-result-add:not(:disabled){
  background:transparent;color:var(--gtsc-accent);border:1px solid var(--gtsc-accent);
}
.gtsc-app .gtsc-picker{background:var(--gtsc-panel-bg);border-color:var(--gtsc-border-color);color:var(--gtsc-text)}
.gtsc-app .gtsc-picker label{color:var(--gtsc-text)}
.gtsc-app .gtsc-table-wrap{border-color:var(--gtsc-border-color);background:var(--gtsc-surface)}
.gtsc-app .gtsc-spec-table{background:var(--gtsc-surface);color:var(--gtsc-text)}
.gtsc-app .gtsc-spec-table th,.gtsc-app .gtsc-spec-table td{color:var(--gtsc-text);border-bottom-color:var(--gtsc-border-color)}
.gtsc-app .gtsc-spec-table thead th{background:var(--gtsc-header-bg)}
.gtsc-app .gtsc-spec-table .gtsc-label-cell{background:var(--gtsc-label-bg);box-shadow:1px 0 0 var(--gtsc-border-color)}
.gtsc-app .gtsc-spec-table thead .gtsc-label-cell{background:var(--gtsc-header-bg)}
.gtsc-app .gtsc-spec-table .gtsc-group-row>th{background:var(--gtsc-group-bg)!important;color:var(--gtsc-text)!important}
.gtsc-app .gtsc-group-toggle{color:var(--gtsc-text)!important}
.gtsc-app .gtsc-spec-table td.gtsc-best-value{background:var(--gtsc-best-bg)!important;color:var(--gtsc-best-text)!important}
.gtsc-app .gtsc-product-link{color:var(--gtsc-accent)}
.gtsc-app .gtsc-toggle{position:relative;cursor:pointer;margin:0;display:inline-flex;align-items:center;gap:5px;font-size:.9em}
.gtsc-app.gtsc-toggle-button .gtsc-toggle input,.gtsc-app.gtsc-toggle-switch .gtsc-toggle input{
  position:absolute;opacity:0;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);
}
.gtsc-app.gtsc-toggle-button .gtsc-toggle span{
  display:inline-block;padding:7px 10px;border:1px solid var(--gtsc-border-color);border-radius:var(--gtsc-button-radius);
  background:var(--gtsc-surface);color:var(--gtsc-text);line-height:1.25;
}
.gtsc-app.gtsc-toggle-button .gtsc-toggle input:checked+span{background:var(--gtsc-accent);color:var(--gtsc-button-text);border-color:var(--gtsc-accent)}
.gtsc-app.gtsc-toggle-button .gtsc-toggle input:focus-visible+span,.gtsc-app.gtsc-toggle-switch .gtsc-toggle input:focus-visible+span{outline:3px solid #ffbf47;outline-offset:2px}
.gtsc-app.gtsc-toggle-switch .gtsc-toggle span{display:inline-flex;align-items:center;gap:7px}
.gtsc-app.gtsc-toggle-switch .gtsc-toggle span:before{
  content:'';display:inline-block;width:38px;height:22px;border-radius:20px;background:#9eaab4;
  box-shadow:inset 0 0 0 2px #8798a5;vertical-align:middle;flex-shrink:0;
}
.gtsc-app.gtsc-toggle-switch .gtsc-toggle input:checked+span:before{background:var(--gtsc-accent);box-shadow:inset 0 0 0 2px var(--gtsc-accent)}
.gtsc-app.gtsc-toggle-switch .gtsc-toggle span:after{
  content:'';position:absolute;left:3px;top:50%;transform:translateY(-50%);width:16px;height:16px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.18);pointer-events:none;
}
.gtsc-app.gtsc-toggle-switch .gtsc-toggle input:checked+span:after{left:19px}
.gtsc-app.gtsc-product-layout-horizontal .gtsc-product-cell img{
  float:left;margin:0 9px 9px 0;width:min(65px,var(--gtsc-image-width));height:min(65px,var(--gtsc-image-width));
}
.gtsc-app.gtsc-product-layout-horizontal .gtsc-column-actions{clear:both}
.gtsc-app .gtsc-note{color:var(--gtsc-text);opacity:.8}
@media (max-width:650px){
  .gtsc-app .gtsc-spec-table th.gtsc-label-cell,
  .gtsc-app .gtsc-spec-table td.gtsc-label-cell{
    width:var(--gtsc-mobile-label-width)!important;min-width:var(--gtsc-mobile-label-width)!important;max-width:var(--gtsc-mobile-label-width)!important;
  }
  .gtsc-app .gtsc-spec-table th.gtsc-product-cell,
  .gtsc-app .gtsc-spec-table tbody tr:not(.gtsc-group-row)>td{
    width:var(--gtsc-mobile-product-width)!important;min-width:var(--gtsc-mobile-product-width)!important;max-width:var(--gtsc-mobile-product-width)!important;
  }
  .gtsc-app .gtsc-toolbar-controls{flex-basis:100%}
  .gtsc-app .gtsc-product-cell img{width:min(65px,var(--gtsc-image-width));height:min(65px,var(--gtsc-image-width))}
}

/* beta.12: table outer width and separate label/value overflow behaviour. */
.gtsc-app.gtsc-table-mode-full .gtsc-table-wrap{width:100%!important;max-width:100%!important}
.gtsc-app.gtsc-table-mode-max .gtsc-table-wrap{width:100%!important;max-width:min(100%,var(--gtsc-table-width,980px))!important}
.gtsc-app.gtsc-table-mode-fixed .gtsc-table-wrap{width:var(--gtsc-table-width,980px)!important;max-width:100%!important}
.gtsc-app .gtsc-spec-table .gtsc-cell-text{display:block;max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.gtsc-app.gtsc-label-wrap-nowrap .gtsc-spec-table .gtsc-label-cell .gtsc-cell-text,
.gtsc-app.gtsc-value-wrap-nowrap .gtsc-spec-table td .gtsc-cell-text{white-space:nowrap!important;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
.gtsc-app.gtsc-label-wrap-clamp .gtsc-spec-table .gtsc-label-cell .gtsc-cell-text,
.gtsc-app.gtsc-value-wrap-clamp .gtsc-spec-table td .gtsc-cell-text{
  display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:var(--gtsc-clamp-lines,3);overflow:hidden;white-space:normal;overflow-wrap:anywhere
}
/* Titles remain accessible in the native title attribute when text is truncated. */
@media(max-width:650px){
  .gtsc-app.gtsc-mobile-toolbar-stacked .gtsc-heading{flex-basis:100%}
  .gtsc-app.gtsc-mobile-toolbar-stacked .gtsc-toolbar-controls{flex-basis:100%}
  .gtsc-app.gtsc-mobile-add-full .gtsc-toolbar-controls>.gtsc-add{width:100%;flex-basis:100%}
  .gtsc-app.gtsc-mobile-filters-1 .gtsc-filter-grid{grid-template-columns:minmax(0,1fr)}
  .gtsc-app.gtsc-mobile-filters-2 .gtsc-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* beta.23: explicit comparison clear is available only when removal is allowed. */
.gtsc-app .gtsc-clear{color:#87333b;border-color:#d8b5b8;background:transparent}
.gtsc-app .gtsc-clear:hover{background:#fff3f3}
.gtsc-app .gtsc-clear[hidden]{display:none!important}

/* beta.24: make the zero-product guidance identical for all shortcode variants.
   An empty state has no table yet, so its border must not depend on category
   or preset appearance overrides. Populated comparison tables are unchanged. */
.gtsc-app .gtsc-table-wrap.gtsc-is-empty {
  border: 0 !important;
  border-radius: 0;
  box-shadow: none !important;
  background: transparent !important;
  padding: 0 8px;
}
