/* Shared layout for Chart.js graph templates — link after base.css or geometry.css + color.css */

/* Sticky footer: body column + min-height so .site-footer { margin-top: auto } reaches the viewport bottom.
   Light shells (geometry + color) do not load base.css; they still load this file. */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

#chartFlowId {
    max-height: 600px;
}

#chartChargeId {
    max-height: 600px;
}

#chartSignalId {
    max-height: 360px;
}

#THCanvas {
    max-height: 300px;
}

#VOCCanvas {
    max-height: 400px;
}

.energyTable tr td:nth-child(2) {
    text-align: right;
    padding-left: 5px;
}

/* Smart plug — summary row: live kW (left) + range total kWh (right) */
.smartplug-live-reading {
    text-align: center;
    margin: 0.5rem auto 1.25rem;
    max-width: 28rem;
}

.smartplug-live-reading--split {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem 1.5rem;
    margin: 0.5rem auto 1.25rem;
    padding: 0 0.75rem;
    max-width: 48rem;
    width: 100%;
    box-sizing: border-box;
}

.smartplug-live-reading__half {
    flex: 1 1 calc(50% - 0.75rem);
    min-width: min(100%, 11rem);
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .smartplug-live-reading--split .smartplug-live-reading__half--total {
        border-left: 1px solid var(--ui-border);
        padding-left: 1.125rem;
    }
}

@media (max-width: 599px) {
    .smartplug-live-reading--split .smartplug-live-reading__half--total {
        border-top: 1px solid var(--ui-border);
        padding-top: 1rem;
        margin-top: 0.35rem;
    }
}

.smartplug-live-reading__half--total .smartplug-live-reading__value-row {
    margin-bottom: 0;
}

.smartplug-live-reading__label {
    margin: 0 0 0.35rem;
    font-size: 0.95rem;
    color: var(--ui-fg-muted);
    font-weight: 500;
}

.smartplug-live-reading__value-row {
    margin: 0 0 0.4rem;
    line-height: 1.15;
}

.smartplug-live-reading__power {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ui-fg-heading);
    letter-spacing: -0.02em;
}

.smartplug-live-reading__unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ui-fg-muted);
    margin-left: 0.35em;
    vertical-align: 0.35em;
}

.smartplug-live-reading__meta {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ui-fg-muted);
    line-height: 1.4;
}

.time-range-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}

h2 {
    margin-left: 5px;
}

table {
    margin-left: 5px;
}
