﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:root {
    --theme-color: #ff7a00; /* your heater orange */
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

/* 🔔 Firmware update icon (top-left over the card) */
/* 🔔 Firmware update icon (top-left over the card) */ 

/*.fw-update-indicator {
    position: absolute;
    top: 4.5rem;
    left: 1rem;*/
    /* ⬇ make it more of a pill than a perfect circle */
    /*width: 52px;
    height: 30px;
    border: none;
    padding: 0;
    border-radius: 14px;*/ /* <= NOT fully round */
    /*cursor: pointer;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    z-index: 9999;*/
    /* base state: no glow, animation adds it */
    /*box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    animation: fw-update-pulse 2.2s infinite;
}*/
.fw-update-indicator {
    position: absolute;
    top: 4.4rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    border: none;
    padding: 0;
    background: transparent; /* transparent! */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    z-index: 9999;
}
/* Container that will hold the glow */
.fw-cloud-pulse {
    position: relative; /* required */
}

    /* 🌟 Cloud-shaped / tight pulsing glow */
    .fw-cloud-pulse::before {
        content: "";
        position: absolute;
        inset: -1px; /* VERY tight box */
        background: rgba(255, 174, 0, 0.38); /* strong heater orange */
        filter: blur(10px); /* narrow glow */
        border-radius: 10px; /* soft edges */
        z-index: -1;
        animation: fw-cloud-pulse 2s ease-in-out infinite;
    }

/* Tight cloud glow animation */
@keyframes fw-cloud-pulse {
    0% {
        opacity: 0.35;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.10);
    }
    /* smaller pulse = tighter glow */
    100% {
        opacity: 0.35;
        transform: scale(1);
    }
}

/* SVG cloud */
.fw-update-icon {
    width: 40px; /* was 32px */
    height: 40px; /* was 32px */
}

.fw-cloud {
    stroke: #ffc107;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fw-update-arrow {
    stroke: #ffc107;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.fw-update-circle {
    fill: rgba(255, 193, 7, 0.25);
    stroke: #ffc107;
    stroke-width: 2;
}

.fw-update-arrow {
    fill: #ffc107;
}

@keyframes fw-update-pulse {
    0% {
        opacity: 0.9;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }

    50% {
        opacity: 1;
        /* ↓ Tighter glow */
        box-shadow: 0 0 10px 2px rgba(255, 193, 7, 0.55);
    }

    100% {
        opacity: 0.9;
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}
/* 🔧 Firmware dialog */

.fw-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.fw-dialog {
    background: #181818;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    width: min(320px, 90%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.fw-dialog-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffc107;
}

.fw-dialog-body {
    font-size: 0.9rem;
    color: #f0f0f0;
    margin-bottom: 0.75rem;
}

.fw-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.fw-dialog-btn {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    background: #333;
    color: #f0f0f0;
}

.fw-dialog-btn-primary {
    background: #ffc107;
    color: #000;
}
/* Cloud outline (same orange glow as your theme) */

.fw-cloud {
    stroke: #ffc107;
}
/* Arrow inside the cloud */

.fw-update-arrow {
    stroke: #ffc107;
    fill: none;
}

/* 🔧 Firmware dialog – keep as you have it */
.fw-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.fw-dialog {
    background: #181818;
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    width: min(320px, 90%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 193, 7, 0.4);
}

.fw-dialog-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #ffc107;
}

.fw-dialog-body {
    font-size: 0.9rem;
    color: #f0f0f0;
    margin-bottom: 0.75rem;
}

.fw-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.fw-dialog-btn {
    border: none;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    cursor: pointer;
    background: #333;
    color: #f0f0f0;
}

.fw-dialog-btn-primary {
    background: #ffc107;
    color: #000;
}

.fw-update-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.fw-update-popup {
    min-width: 220px;
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 193, 7, 0.7);
    box-shadow: 0 0 18px rgba(255, 193, 7, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.fw-update-spinner {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 3px solid rgba(255, 193, 7, 0.25);
    border-top-color: #ffc107;
    animation: fw-update-spin 0.9s linear infinite;
}

.fw-update-text {
    color: #fff;
    text-align: center;
    font-size: 0.95rem;
}

    .fw-update-text small {
        font-size: 0.8rem;
        opacity: 0.8;
    }

@keyframes fw-update-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ----------------------------------*/
/* ERROR DIALOG */
/* 🔥 Dark backdrop over everything */
/* ----------------------------------*/
.heater-error-backdrop {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(255, 140, 0, 0.18), transparent 55%), rgba(0, 0, 0, 0.75);
    z-index: 9998;
}

/* 🔥 Glowing card, centered */
.heater-error-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 440px;
    width: calc(100% - 2.5rem);
    background: radial-gradient(circle at top, #2b1610 0, #101010 55%, #050505 100%);
    border-radius: 1.2rem;
    border: 1px solid rgba(255, 99, 71, 0.85);
    box-shadow: 0 0 25px rgba(255, 140, 0, 0.35), 0 0 60px rgba(0, 0, 0, 0.75);
    color: #fdfdfd;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
}

/* Header strip, similar to HeaterControlDialog top glow */
.heater-error-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem;
    background: linear-gradient( 90deg, #b00020, #ff4b2b, #ff9800 );
    box-shadow: 0 0 20px rgba(255, 120, 60, 0.7);
}

/* Title + icon row */
.heater-error-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.heater-error-icon {
    width: 1.3rem;
    height: 1.3rem;
    fill: #ffe7d9;
    filter: drop-shadow(0 0 6px rgba(255, 204, 128, 0.9));
}

.heater-error-title {
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
}

/* Small close "x" */
.heater-error-close {
    border: none;
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

    .heater-error-close:hover {
        background: rgba(0, 0, 0, 0.55);
        transform: scale(1.05);
    }

/* Body text */
.heater-error-body {
    padding: 1.1rem 1.4rem 0.9rem;
    font-size: 0.95rem;
    color: #f5f5f5;
}

/* Footer with glowing button */
.heater-error-footer {
    padding: 0.75rem 1.4rem 1.1rem;
    display: flex;
    justify-content: flex-end;
}

.heater-error-ok {
    min-width: 90px;
    padding: 0.45rem 1.3rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 152, 0, 0.9);
    background: radial-gradient(circle at top, #ffcc80 0, #ff7043 40%, #d84315 100%);
    color: #1b0600;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.6), 0 0 26px rgba(255, 87, 34, 0.5);
    transition: transform 0.1s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .heater-error-ok:hover {
        transform: translateY(-1px) scale(1.02);
        filter: brightness(1.05);
        box-shadow: 0 0 17px rgba(255, 193, 7, 0.5), 0 0 32px rgba(255, 111, 0, 0.4);
    }

/* Slight responsive tweak for very narrow screens */
@media (max-width: 420px) {
    .heater-error-dialog {
        width: calc(100% - 1.5rem);
    }
}
