/*
 * forbrug.css - Styling til Forbrug-siden.
 * Indeholder dato-valg, kWh/DKK toggle-switch, Chart.js container,
 * datatabel og total-boks.
 */

/* ===== DATO-VALG ===== */
.date-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.date-section label {
    font-size: 14px;
    color: #888;
}

.date-section input[type="date"] {
    padding: 10px;
    border: 1px solid #333;
    border-radius: 8px;
    background-color: #1a1a1a;
    color: white;
    font-size: 14px;
}

.hent-btn {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    background-color: #2980b9;
    font-size: 16px;
    margin-top: 4px;
}

.hent-btn:hover {
    background-color: #3498db;
}

.hent-btn:disabled {
    background-color: #555;
    cursor: not-allowed;
}

/* ===== TOGGLE kWh / DKK ===== */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.toggle-label {
    font-size: 14px;
    color: #888;
}

.toggle-label.active {
    color: white;
    font-weight: bold;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #2980b9;
    border-radius: 26px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.slider::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .slider {
    background-color: #27ae60;
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(24px);
}

/* ===== CHART ===== */
.chart-container {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    height: 220px;
    position: relative;
}

/* ===== DATATABEL ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.data-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 2px solid #333;
    color: #888;
    font-size: 12px;
}

.data-table td {
    padding: 8px;
    border-bottom: 1px solid #222;
    font-size: 13px;
}

/* ===== TOTAL-BOKS ===== */
.total-box {
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.total-box .total-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.total-box .total-value {
    font-size: 28px;
    font-weight: bold;
}
