/* =============================================
   TikTok Budget Rechner – Stylesheet
   Präfix: tbr- (verhindert Konflikte mit Theme)
   ============================================= */

:root {
    --tbr-accent: #6366f1;
}

.tbr-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    color: #1a1a2e;
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
}

/* Titel */
.tbr-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 1.75rem;
    color: #0f0f1a;
    border-left: 4px solid var(--tbr-accent);
    padding-left: .75rem;
    line-height: 1.3;
}

/* Abschnittüberschriften */
.tbr-section-heading {
    font-size: 1rem;
    font-weight: 600;
    margin: 2rem 0 .75rem;
    color: #444;
}

/* ---- Slider-Controls ---- */
.tbr-controls {
    background: #f8f8fc;
    border: 1px solid #e8e8f0;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.tbr-control-row {
    margin-bottom: 1.1rem;
}

.tbr-control-row:last-child {
    margin-bottom: 0;
}

.tbr-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #555;
    margin-bottom: .35rem;
    font-weight: 500;
}

.tbr-val {
    font-weight: 700;
    color: var(--tbr-accent);
    font-size: 14px;
}

/* Range-Slider */
.tbr-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 99px;
    background: #dde;
    outline: none;
    cursor: pointer;
    accent-color: var(--tbr-accent);
}

.tbr-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--tbr-accent);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(99,102,241,.35);
    transition: transform .15s;
}

.tbr-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.tbr-range::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: var(--tbr-accent);
    cursor: pointer;
}

.tbr-range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #aaa;
    margin-top: .2rem;
}

/* ---- KPI-Grid ---- */
.tbr-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 1.75rem;
}

@media (max-width: 600px) {
    .tbr-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 380px) {
    .tbr-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.tbr-kpi-card {
    background: #f8f8fc;
    border: 1px solid #e8e8f0;
    border-radius: 10px;
    padding: .85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color .2s;
}

.tbr-kpi-card:hover {
    border-color: var(--tbr-accent);
}

.tbr-kpi-card--accent {
    background: color-mix(in srgb, var(--tbr-accent) 8%, #fff);
    border-color: color-mix(in srgb, var(--tbr-accent) 35%, transparent);
}

.tbr-kpi-label {
    font-size: 12px;
    color: #777;
    font-weight: 500;
}

.tbr-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}

.tbr-kpi-card--accent .tbr-kpi-value {
    color: var(--tbr-accent);
}

/* ---- Tabellen ---- */
.tbr-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #e8e8f0;
    margin-bottom: 1.25rem;
}

.tbr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.tbr-table thead {
    background: #f3f3f8;
}

.tbr-table th {
    font-weight: 600;
    font-size: 12px;
    color: #666;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #e8e8f0;
}

.tbr-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0f0f5;
    color: #333;
}

.tbr-table tbody tr:last-child td {
    border-bottom: none;
}

.tbr-table tbody tr:hover td {
    background: #fafaff;
}

/* ---- Badges ---- */
.tbr-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 99px;
}

.tbr-badge--green {
    background: #dcfce7;
    color: #16a34a;
}

.tbr-badge--amber {
    background: #fef3c7;
    color: #b45309;
}

.tbr-badge--gray {
    background: #f1f5f9;
    color: #64748b;
}
