/**
 * TBG RTE Calculator v8.5.8
 *
 * Bovenop tbg-tools.css.
 */

/* ============================================================
 * INPUTS — 2-koloms grid
 * ============================================================ */

.tbg-rte__inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px 20px;
    margin-bottom: 24px;
}

.tbg-rte__inputs .tbg-tool__field {
    margin-bottom: 0;
}

.tbg-rte__input-row {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--tbg-border);
    border-radius: var(--tbg-radius-md);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tbg-rte__input-row:hover {
    border-color: var(--tbg-border-strong);
}

.tbg-rte__input-row:focus-within {
    border-color: var(--tbg-accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.tbg-rte__input {
    flex: 1;
    padding: 10px 14px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-family: inherit;
    color: var(--tbg-text);
    font-weight: 700;
    width: 100%;
}

.tbg-rte__input:focus {
    outline: none;
}

.tbg-rte__input--prefixed {
    padding-left: 4px;
}

.tbg-rte__input-prefix {
    padding-left: 14px;
    font-size: 14px;
    color: var(--tbg-text-light);
    font-weight: 600;
}

.tbg-rte__input-unit {
    padding: 0 14px;
    font-size: 13px;
    color: var(--tbg-text-light);
    font-weight: 600;
    border-left: 1px solid var(--tbg-border);
    height: 100%;
    display: flex;
    align-items: center;
    background: transparent;
    border-radius: 0;
    flex-shrink: 0;
}

/* ============================================================
 * RESULTS
 * ============================================================ */

.tbg-rte__results {
    border-top: 1px solid var(--tbg-border);
    padding-top: 20px;
}

.tbg-rte__results:empty {
    display: none;
}

.tbg-rte__hero {
    background: white;
    border: 1px solid var(--tbg-border);
    border-radius: var(--tbg-radius-xl);
    padding: 20px;
    margin-bottom: 16px;
}

.tbg-rte__bar-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
}

.tbg-rte__bar-good {
    color: var(--tbg-accent);
}

.tbg-rte__bar-loss {
    color: var(--tbg-text-meta);
}

.tbg-rte__bar {
    height: 10px;
    background: var(--tbg-border);
    border-radius: 5px;
    overflow: hidden;
}

.tbg-rte__bar-fill {
    height: 100%;
    background: var(--tbg-accent);
    transition: width 0.25s ease;
}

.tbg-rte__cycle {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 14px;
    font-size: 14px;
    color: var(--tbg-text-muted);
    line-height: 1.55;
}

.tbg-rte__cycle svg {
    color: var(--tbg-accent);
    flex-shrink: 0;
    margin-top: 1px;
}

.tbg-rte__cycle strong {
    color: var(--tbg-text);
    font-weight: 700;
}

.tbg-rte__stat-unit {
    font-size: 0.65em;
    color: var(--tbg-text-light);
    font-weight: 600;
}

/* Breakdown table */
.tbg-rte__breakdown {
    background: white;
    border: 1px solid var(--tbg-border);
    border-radius: var(--tbg-radius-lg);
    padding: 4px 16px;
    margin-bottom: 16px;
}

.tbg-rte__brow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--tbg-border);
}

.tbg-rte__brow:last-child {
    border-bottom: none;
}

.tbg-rte__brow span:first-child {
    color: var(--tbg-text-light);
}

.tbg-rte__brow span:last-child {
    color: var(--tbg-text);
    font-weight: 700;
}

.tbg-rte__brow--total span:first-child {
    color: var(--tbg-text);
    font-weight: 700;
}

@media (max-width: 640px) {
    .tbg-rte__inputs {
        grid-template-columns: 1fr;
    }
}
