/**
 * Getest tabel - Editorial layout
 * Server-side rendered table met horizontale scroll op smal scherm.
 */

.tbg-gt {
    --tbg-gt-bg: #faf8f4;
    --tbg-gt-bg-soft: #f5f3ee;
    --tbg-gt-border: #eee8e0;
    --tbg-gt-border-strong: #ddd6c8;
    --tbg-gt-text: #0f172a;
    --tbg-gt-text-light: #64748b;
    --tbg-gt-text-meta: #94a3b8;
    --tbg-gt-accent: #10b981;
    --tbg-gt-accent-hover: #059669;
    font-family: inherit;
    color: var(--tbg-gt-text);
    margin: 2rem 0;
}

.tbg-gt *,
.tbg-gt *::before,
.tbg-gt *::after {
    box-sizing: border-box;
}

/* Shell */
.tbg-gt-shell {
    background: #fff;
    border: 1px solid var(--tbg-gt-border);
    border-radius: 16px;
}

/* Eerste/laatste shell-kinderen krijgen rounded corners (vervangt overflow:hidden) */
.tbg-gt-shell > :first-child {
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.tbg-gt-shell > :last-child {
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

/* Editorial header */
.tbg-gt-hdr {
    padding: 24px 28px;
    border-bottom: 1px solid var(--tbg-gt-border);
    background: var(--tbg-gt-bg);
}

.tbg-gt-eyebrow {
    font-size: 11px;
    font-weight: 700;
    color: var(--tbg-gt-accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.tbg-gt-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
    color: var(--tbg-gt-text);
    line-height: 1.2;
}

.tbg-gt-sub {
    font-size: 13px;
    color: var(--tbg-gt-text-light);
    line-height: 1.5;
}

/* Controls */
.tbg-gt-controls {
    padding: 14px 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--tbg-gt-border);
}

.tbg-gt-search {
    flex: 1;
    min-width: 200px;
    height: 38px;
    padding-top: 0 !important;
    padding-right: 14px !important;
    padding-bottom: 0 !important;
    padding-left: 44px !important;
    border: 1px solid var(--tbg-gt-border);
    border-radius: 8px;
    background-color: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--tbg-gt-text);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'><circle cx='11' cy='11' r='8'/><path d='m21 21-4.3-4.3'/></svg>");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 14px 14px;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}

.tbg-gt-search::-webkit-search-cancel-button,
.tbg-gt-search::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.tbg-gt-search:focus {
    outline: none;
    border-color: var(--tbg-gt-accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

/* BE filter knop */
.tbg-gt-be-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 14px;
    border: 1px solid var(--tbg-gt-border);
    border-radius: 8px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--tbg-gt-text-light);
    transition: background .15s, border-color .15s, color .15s;
    white-space: nowrap;
}

.tbg-gt-be-filter:hover {
    border-color: var(--tbg-gt-border-strong);
    color: var(--tbg-gt-text);
}

.tbg-gt-be-filter[data-active="true"] {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #854f0b;
}

.tbg-gt-be-filter[data-active="true"]:hover {
    background: #fde68a;
}

.tbg-gt-be-flag {
    font-size: 14px;
    line-height: 1;
}

.tbg-gt-be-label {
    font-size: 12px;
}

.tbg-gt-be-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--tbg-gt-bg-soft);
    color: var(--tbg-gt-text-meta);
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tbg-gt-be-filter[data-active="true"] .tbg-gt-be-count {
    background: #fcd34d;
    color: #854f0b;
}

/* Count bar */
.tbg-gt-count-bar {
    padding: 10px 28px;
    background: var(--tbg-gt-bg-soft);
    border-bottom: 1px solid var(--tbg-gt-border);
    font-size: 11px;
    color: var(--tbg-gt-text-light);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tbg-gt-scroll-hint {
    font-size: 10px;
    color: var(--tbg-gt-text-meta);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    display: none;
}

@media (max-width: 768px) {
    .tbg-gt-scroll-hint {
        display: inline-flex;
    }
}

/* Table wrap met horizontale scroll */
.tbg-gt-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    background: #fff;
    -webkit-overflow-scrolling: touch;
}

.tbg-gt-wrap::-webkit-scrollbar {
    height: 8px;
}

.tbg-gt-wrap::-webkit-scrollbar-track {
    background: var(--tbg-gt-bg-soft);
}

.tbg-gt-wrap::-webkit-scrollbar-thumb {
    background: var(--tbg-gt-border-strong);
    border-radius: 4px;
}

/* Table */
.tbg-gt-tbl {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    font-size: 14px;
    margin: 0;
}

.tbg-gt-tbl thead th {
    padding: 14px 16px;
    font-size: 10px;
    font-weight: 700;
    color: var(--tbg-gt-text-meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: left;
    border-bottom: 1px solid var(--tbg-gt-border);
    background: #fff;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    transition: background .15s, color .15s;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tbg-gt-tbl thead th:hover {
    background: var(--tbg-gt-bg-soft);
    color: var(--tbg-gt-text);
}

.tbg-gt-tbl thead th.num {
    text-align: right;
}

.tbg-gt-tbl thead th.c {
    text-align: center;
}

.tbg-gt-tbl thead th.arrow-col {
    width: 40px;
    cursor: default;
}

.tbg-gt-tbl thead th.arrow-col:hover {
    background: #fff;
}

.tbg-gt-tbl thead th .srt {
    opacity: .3;
    margin-left: 4px;
    font-size: 10px;
    display: inline-block;
    width: 8px;
}

.tbg-gt-tbl thead th.sorted {
    color: var(--tbg-gt-text);
}

.tbg-gt-tbl thead th.sorted .srt {
    opacity: 1;
    color: var(--tbg-gt-accent);
}

/* Body */
.tbg-gt-tbl tbody tr {
    cursor: pointer;
    transition: background .12s;
    border-bottom: 1px solid var(--tbg-gt-border);
}

.tbg-gt-tbl tbody tr:hover {
    background: var(--tbg-gt-bg);
}

.tbg-gt-tbl tbody tr:last-child {
    border-bottom: none;
}

.tbg-gt-tbl tbody td {
    padding: 18px 16px;
    vertical-align: middle;
}

.tbg-gt-tbl tbody td.num {
    text-align: right;
    white-space: nowrap;
}

.tbg-gt-tbl tbody td.c {
    text-align: center;
    position: relative;
    overflow: visible;
}

.tbg-gt-tbl tbody td.arrow-col {
    text-align: right;
    width: 40px;
    padding-left: 0;
}

/* Product cell */
.tbg-gt-prod {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 220px;
    text-decoration: none;
    color: inherit;
}

.tbg-gt-prod:hover .tbg-gt-name {
    color: var(--tbg-gt-accent);
}

.tbg-gt-thumb {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--tbg-gt-bg-soft);
    border: 1px solid var(--tbg-gt-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    color: var(--tbg-gt-text-meta);
    font-weight: 700;
    text-align: center;
    padding: 3px;
    overflow: hidden;
}

.tbg-gt-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.tbg-gt-prod-text {
    min-width: 0;
}

.tbg-gt-brand {
    font-size: 11px;
    color: var(--tbg-gt-text-meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.tbg-gt-name {
    font-weight: 700;
    font-size: 14px;
    color: var(--tbg-gt-text);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .15s;
}

.tbg-gt-flag {
    font-size: 13px;
    opacity: .85;
    flex-shrink: 0;
}

/* Spec cells (capaciteit, vermogen) */
.tbg-gt-spec {
    font-size: 14px;
    font-weight: 700;
    color: var(--tbg-gt-text);
    font-variant-numeric: tabular-nums;
}

.tbg-gt-spec-unit {
    font-size: 11px;
    color: var(--tbg-gt-text-meta);
    font-weight: 500;
    margin-left: 3px;
}

/* Score pill */
.tbg-gt-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 30px;
    padding: 0 8px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.tbg-score-high {
    background: #ecfdf5;
    color: #0f6e56;
}

.tbg-score-mid {
    background: #fef3c7;
    color: #854f0b;
}

.tbg-score-low {
    background: var(--tbg-gt-bg-soft);
    color: var(--tbg-gt-text-light);
}

/* Price */
.tbg-gt-pricecol {
    white-space: nowrap;
    text-align: right;
}

.tbg-gt-price-from {
    font-size: 9px;
    color: var(--tbg-gt-text-meta);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    display: block;
    line-height: 1;
    margin-bottom: 3px;
}

.tbg-gt-price-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--tbg-gt-text);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    display: block;
    line-height: 1.1;
}

.tbg-gt-ppk-sub {
    font-size: 10px;
    color: var(--tbg-gt-text-meta);
    font-weight: 500;
    display: block;
    margin-top: 3px;
}

/* Arrow */
.tbg-gt-arrow {
    color: var(--tbg-gt-text-meta);
    font-size: 16px;
    transition: color .12s, transform .12s;
    display: inline-block;
}

.tbg-gt-tbl tbody tr:hover .tbg-gt-arrow {
    color: var(--tbg-gt-accent);
    transform: translateX(3px);
}

/* Empty */
.tbg-gt-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--tbg-gt-text-light);
    font-size: 14px;
}

/* MPPT, RTE en BE — check/dash + waarden */
.tbg-gt-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #0f6e56;
}

.tbg-gt-check svg {
    width: 13px;
    height: 13px;
}

.tbg-gt-dash {
    color: #cbd5e1;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    display: inline-block;
}

.tbg-gt-rte {
    font-size: 14px;
    font-weight: 700;
    color: var(--tbg-gt-text);
    font-variant-numeric: tabular-nums;
    border-bottom: 1px dotted #cbd5e1;
}

.tbg-gt-rte-empty {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 1px dotted #cbd5e1;
}

/* Tooltip wrap (op cellen) */
.tbg-gt-help,
.tbg-gt-help-num {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.tbg-gt-tip {
    position: fixed;
    left: 0;
    top: 0;
    background: var(--tbg-gt-text);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 8px;
    width: 240px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s, visibility .15s;
    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    visibility: hidden;
    text-align: left;
    white-space: normal;
    transform: translateX(-50%) translateY(calc(-100% - 10px));
    box-sizing: border-box;
}

.tbg-gt-help:hover .tbg-gt-tip,
.tbg-gt-help-num:hover .tbg-gt-tip,
.tbg-gt-help.open .tbg-gt-tip,
.tbg-gt-help-num.open .tbg-gt-tip,
.tbg-gt-tip:hover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tbg-gt-tip strong {
    display: block;
    color: var(--tbg-gt-accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.tbg-gt-tip a {
    color: #a7f3d0;
    text-decoration: underline;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
}

.tbg-gt-tip a:hover {
    color: #fff;
}

/* Prijs CTA link onder prijs */
.tbg-gt-price-cta {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--tbg-gt-accent);
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 3px 0;
    border-bottom: 1px solid transparent;
    transition: border-color .15s, color .15s;
    margin-top: 4px;
}

.tbg-gt-price-cta:hover {
    border-bottom-color: var(--tbg-gt-accent);
    color: var(--tbg-gt-accent-hover);
}

.tbg-gt-price-cta svg {
    width: 11px;
    height: 11px;
}

/* Toon meer */
.tbg-gt-more-wrap {
    padding: 16px 28px;
    background: #fff;
    border-top: 1px solid var(--tbg-gt-border);
    text-align: center;
}

.tbg-gt-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    background: var(--tbg-gt-bg);
    border: 1px solid var(--tbg-gt-border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tbg-gt-text);
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tbg-gt-more-btn:hover {
    background: var(--tbg-gt-bg-soft);
    border-color: var(--tbg-gt-accent);
    color: var(--tbg-gt-accent);
}

.tbg-gt-more-btn svg {
    flex-shrink: 0;
}

/* Footer */
.tbg-gt-foot {
    padding: 14px 24px;
    background: #fff;
    border-top: 1px solid var(--tbg-gt-border);
    font-size: 11px;
    color: var(--tbg-gt-text-meta);
    font-weight: 500;
    text-align: center;
    text-transform: none;
    letter-spacing: 0;
}

/* Responsive */
.single .tbg-gt {
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    max-width: 1100px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .tbg-gt {
        margin: 1.5rem 0;
    }

    .tbg-gt-shell {
        border-radius: 12px;
    }

    .tbg-gt-hdr {
        padding: 18px 20px;
    }

    .tbg-gt-title {
        font-size: 1.25rem;
    }

    .tbg-gt-controls {
        padding: 12px 20px;
    }

    .tbg-gt-count-bar {
        padding: 10px 20px;
    }

    .tbg-gt-search {
        width: 100%;
    }

    .tbg-gt-tbl tbody td {
        padding: 14px 12px;
    }
}
