/* ==========================================================================
   TTools Variant Table — ttools-variants.css  v4.0.0
   ========================================================================== */

.ttools-variants { margin-top: 24px; font-size: 0.88em; }

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.ttools-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 18px 20px 22px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
}

.tt-filter-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Numeric track groups get a minimum width so buttons have room */
.tt-filter-group:has(.tt-track-wrap) {
    min-width: 220px;
    flex: 1 1 220px;
}

.tt-filter-label {
    font-size: 0.78em;
    font-weight: 700;
    color: #444;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ── Min/max range inputs (for columns with many values) ────────────────── */
.tt-range-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tt-range-input {
    width: 68px;
    padding: 4px 6px;
    font-size: 0.85em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
}

.tt-range-input:focus {
    outline: none;
    border-color: #8bc34a;
}

.tt-range-sep {
    color: #888;
    font-size: 0.85em;
}

/* ── Track + value buttons ──────────────────────────────────────────────── */
.tt-track-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 320px;
}

.tt-val-btn {
    padding: 4px 9px;
    font-size: 0.78em;
    font-weight: 600;
    border: 1px solid #c5c5c5;
    border-radius: 4px;
    background: #fff;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.5;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.tt-val-btn:hover {
    background: #f0f7e6;
    border-color: #8bc34a;
    color: #33691e;
}

.tt-val-btn.active {
    background: #d4e157;
    border-color: #8bc34a;
    color: #33691e;
}

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.tt-filter-group select {
    padding: 5px 8px;
    font-size: 0.85em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    align-self: flex-start;
}

.tt-filter-group select:focus {
    outline: none;
    border-color: #8bc34a;
}

/* ── Reset button ────────────────────────────────────────────────────────── */
.ttools-reset {
    align-self: flex-end;
    padding: 6px 14px;
    font-size: 0.82em;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s;
    margin-top: auto;
}

.ttools-reset:hover {
    background: #f0f0f0;
    border-color: #999;
}

/* ── Table wrapper ───────────────────────────────────────────────────────── */
.ttools-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ttools-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 480px;
}

.ttools-table thead tr { background: #f5f5f5; }

.ttools-th {
    padding: 9px 8px;
    text-align: left;
    font-size: 0.78em;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 2px solid #ddd;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ttools-th.sortable { cursor: pointer; user-select: none; }
.ttools-th.sortable:hover { background: #ececec; }
.ttools-th-icon { text-align: center; }

.sort-arrow::before          { content: ' ↕'; opacity: 0.35; font-size: 0.9em; }
.ttools-th.sort-asc  .sort-arrow::before { content: ' ↑'; opacity: 1; }
.ttools-th.sort-desc .sort-arrow::before { content: ' ↓'; opacity: 1; }

.ttools-table tbody tr { border-bottom: 1px solid #eee; transition: background 0.1s; }
.ttools-table tbody tr:hover { background: #fafafa; }
.ttools-current-row { background: #eef6fb !important; font-weight: 700; }

.ttools-link { color: #0073aa; text-decoration: none; }
.ttools-link:hover { text-decoration: underline; }
.ttools-zum-produkt { white-space: nowrap; font-weight: 600; }
.ttools-icon { display: block; margin: 0 auto; vertical-align: middle; }
