/* ROAS-kalkulator – minimal unstyled base */
/* Legg til egne farger ved å overstyre disse klassene i temaet ditt */

.roas-kalk-wrap {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: inherit;
    margin: 1.5rem 0;
}

.roas-kalk-wrap *,
.roas-kalk-wrap *::before,
.roas-kalk-wrap *::after {
    box-sizing: border-box;
}

/* Section titles */
.roas-kalk-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin: 1.5rem 0 0.6rem;
}

/* Input panels */
.roas-kalk-panel {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    background: #fff;
}

.roas-kalk-slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.roas-kalk-slider-row:last-child {
    margin-bottom: 0;
}

.roas-kalk-slider-label {
    font-size: 0.85rem;
    color: #555;
    width: 160px;
    flex-shrink: 0;
}

.roas-kalk-input[type="range"] {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    accent-color: currentColor;
}

.roas-kalk-slider-val {
    font-size: 0.85rem;
    font-weight: 600;
    min-width: 100px;
    text-align: right;
    color: inherit;
}

/* Metric cards grid */
.roas-kalk-metrics {
    display: grid;
    gap: 10px;
    margin-bottom: 0.5rem;
}

.roas-kalk-metrics-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 640px) {
    .roas-kalk-metrics-5 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.roas-kalk-metric {
    background: #f5f5f5;
    border-radius: 6px;
    padding: 0.75rem 0.85rem;
}

.roas-kalk-metric--highlight {
    background: #e6f7ef;
}

.roas-kalk-metric-label {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

.roas-kalk-metric--highlight .roas-kalk-metric-label {
    color: #2e7d5a;
}

.roas-kalk-metric-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: inherit;
}

.roas-kalk-metric--highlight .roas-kalk-metric-value {
    color: #1a5c3f;
}

.roas-kalk-metric-sub {
    font-size: 0.65rem;
    color: #aaa;
    margin-top: 2px;
}

.roas-kalk-metric--highlight .roas-kalk-metric-sub {
    color: #5a9e7e;
}

/* Bar comparison */
.roas-kalk-bars {
    margin-bottom: 0.5rem;
}

.roas-kalk-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.roas-kalk-bar-label {
    font-size: 0.75rem;
    color: #888;
    width: 80px;
    flex-shrink: 0;
    text-align: right;
}

.roas-kalk-bar-track {
    flex: 1;
    height: 28px;
    background: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
}

.roas-kalk-bar-fill {
    height: 100%;
    border-radius: 6px;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    transition: width 0.35s ease;
}

.roas-kalk-bar-fill--a {
    background: #93c5fd;
    color: #1e3a5f;
}

.roas-kalk-bar-fill--b {
    background: #6ee7b7;
    color: #064e3b;
}

.roas-kalk-bar-val {
    font-size: 0.75rem;
    color: #666;
    width: 130px;
    text-align: right;
    flex-shrink: 0;
}

.roas-kalk-badge {
    display: inline-block;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}

/* Legend */
.roas-kalk-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 8px;
}

.roas-kalk-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.roas-kalk-legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
    flex-shrink: 0;
}

.roas-kalk-legend-swatch--budget  { background: #93c5fd; }
.roas-kalk-legend-swatch--revenue { background: #3b82f6; }
.roas-kalk-legend-swatch--profit  { background: #10b981; }

/* Chart */
.roas-kalk-chart-wrap {
    position: relative;
    width: 100%;
    height: 260px;
    margin-bottom: 1rem;
}

.roas-kalk-chart {
    width: 100% !important;
    height: 100% !important;
}
