/* ---------------------------------------------------------
   heating.css — Heizungssteuerung HmIP (Nayax-Stil)
   Klassen mit ht- präfixiert.
--------------------------------------------------------- */

/* ── Page header ──────────────────────────────────────── */
.ht-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ht-head__text h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
    border-left: 3px solid var(--brand);
    padding-left: 12px;
    line-height: 1.2;
}
.ht-head__text p {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 3px;
    padding-left: 15px;
}

/* Back link (detail view) */
.ht-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-soft);
    text-decoration: none;
    transition: color .12s;
}
.ht-back:hover { color: var(--text); }
.ht-back i { font-size: 15px; }

/* HmIP status badge */
.ht-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 999px;
    flex-shrink: 0;
}
.ht-status--ok   { background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; }
.ht-status--warn { background: #FEF2F2; color: #B91C1C; border: 1px solid #FECACA; }
.ht-status__dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ht-status--ok   .ht-status__dot { background: #10B981; }
.ht-status--warn .ht-status__dot { background: #EF4444; }

/* ── Flash message ────────────────────────────────────── */
.ht-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 16px;
}
.ht-msg--ok    { background: #ECFDF5; border: 1px solid #A7F3D0; color: #047857; }
.ht-msg--error { background: #FEF2F2; border: 1px solid #FECACA; color: #B91C1C; }

/* ── Summer mode banner ───────────────────────────────── */
.ht-summer {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 18px;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: var(--radius);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ht-summer.is-on {
    background: #FFF7ED;
    border-color: #FED7AA;
}
.ht-summer__icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}
.ht-summer__body {
    flex: 1;
    min-width: 200px;
}
.ht-summer__body strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.ht-summer__body p {
    font-size: 13px;
    color: var(--text-soft);
    line-height: 1.5;
    margin: 0;
}
.ht-summer__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* Summer-mode lock banner (detail view) */
.ht-summer-lock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    background: #FFF7ED;
    border: 1px solid #FED7AA;
    border-radius: var(--radius);
    font-size: 13px;
    color: #92400E;
    margin-bottom: 16px;
}
.ht-summer-lock i { font-size: 16px; flex-shrink: 0; }
.ht-summer-lock a { color: #92400E; font-weight: 600; }

/* ── Buttons ──────────────────────────────────────────── */
.ht-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-soft);
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: background .12s, border-color .12s, color .12s;
    text-decoration: none;
}
.ht-btn:hover { background: var(--bg-soft); color: var(--text); }
.ht-btn i { font-size: 15px; }
.ht-btn--primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.ht-btn--primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.ht-btn:disabled,
.ht-btn--primary:disabled {
    opacity: .38;
    cursor: not-allowed;
}

/* ── Overview: Apartment tiles ────────────────────────── */
.ht-apt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.ht-apt {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s, border-color .15s;
}
.ht-apt:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.ht-apt__head {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
}
.ht-apt__head strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.ht-apt__head small {
    font-size: 11.5px;
    color: var(--text-mute);
    margin-top: 2px;
    display: block;
}

.ht-apt__metric {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 14px;
    gap: 4px;
}
.ht-apt__temp {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-deep);
}
.ht-apt__temp--idle { color: var(--text-mute); }
.ht-apt__metric small {
    font-size: 11.5px;
    color: var(--text-mute);
}

.ht-apt__foot {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 14px;
    background: var(--bg-soft);
    border-top: 1px solid var(--border-soft);
    flex-wrap: wrap;
}

/* Chips on tile and room header */
.ht-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    color: var(--text-mute);
    line-height: 1.5;
    white-space: nowrap;
}
.ht-chip--warn   { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.ht-chip--info   { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.ht-chip--summer { background: #FFF7ED; border-color: #FED7AA; color: #92400E; }

/* ── Room cards (detail view) ─────────────────────────── */
.ht-rooms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.ht-room {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow .15s;
}
.ht-room:hover { box-shadow: var(--shadow-md); }
.ht-room.is-locked { opacity: .7; }

.ht-room__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--bg-soft);
    flex-wrap: wrap;
}
.ht-room__head h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text);
}
.ht-room__chips {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Thermostat control */
.ht-room__thermo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 14px;
}
.ht-stepper {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-soft);
    font-size: 20px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, border-color .12s;
    font-family: inherit;
}
.ht-stepper:hover:not(:disabled) { background: var(--surface); border-color: var(--brand); }
.ht-stepper:disabled { opacity: .3; cursor: not-allowed; }

.ht-room__temp {
    display: flex;
    align-items: baseline;
    gap: 3px;
}
.ht-room__temp strong {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-deep);
    line-height: 1;
    min-width: 70px;
    text-align: center;
}
.ht-room__temp span {
    font-size: 18px;
    color: var(--text-mute);
    font-weight: 500;
}

.ht-room__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid var(--border-soft);
    background: var(--bg-soft);
    flex-wrap: wrap;
}
.ht-room__foot small {
    font-size: 11.5px;
    color: var(--text-mute);
}
.ht-room__foot > div { display: flex; gap: 6px; }

/* ── Empty ────────────────────────────────────────────── */
.ht-empty {
    padding: 40px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-mute);
    font-size: 13.5px;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 900px) {
    .ht-apt-grid  { grid-template-columns: repeat(2, 1fr); }
    .ht-rooms     { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .ht-apt-grid  { grid-template-columns: 1fr; }
    .ht-rooms     { grid-template-columns: 1fr; }
}
