﻿
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.65);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.loading-text {
    margin-top: 12px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--ink);
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes blinkAmber {
    0% {
        color: #d97706;
    }

    50% {
        color: #f59e0b;
    }

    100% {
        color: #d97706;
    }
}

@keyframes flash-bg {
    0% {
        background-color: #ffc107;
    }

    50% {
        background-color: #fff3cd;
    }

    100% {
        background-color: #ffc107;
    }
}



.btn-flash {
    animation: flash-bg 5s infinite;
    color: #000; /* optional, text color during flash */
    border-color: #ffc107; /* optional, match flash */
}

@keyframes flash-fade {
    0% {
        background-color: #ffc107;
    }
    /* Amber */
    100% {
        background-color: transparent;
    }
    /* Normal */
}

.flash {
    animation: flash-fade 4s ease-out;
}


/* Docked action bar at the bottom */
.action-bar {
    position: fixed;
    bottom: 0;
    /* IMPORTANT: prevent covering the nav */
    left: 250px;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #ddd;
    padding: 4px 16px;
    display: flex;
    flex-direction: column; /* <-- THIS is critical */
    gap: 8px;
    z-index: 1000;
}

    .action-bar .d-flex {
        width: 100%;
    }

    .action-bar button {
        flex: 1;
        min-width: 0;
    }



    /* Buttons inside the action bar */
    .action-bar .btn {
        flex: 1; /* even spacing */
        max-width: 500px;
    }

/* Status message above the action bar */
.status-message {
    text-align: center;
    font-weight: 600;
    color: #1f2937;
}


.page-content {
    padding-bottom: 100px; /* height of action bar + spacing */
    
}

/* =========================
   HMI BASE
   ========================= */
.page-content {
    font-size: 0.85rem;
}

/* Reduce bootstrap spacing */
.row {
    --bs-gutter-x: 0.5rem;
}

.container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* ===============================
   HMI HEADER ROW
   =============================== */

.hmi-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: #aaa;
    padding-bottom: 4px;
    border-bottom: 0px solid #333;
    margin-bottom: 4px;
}

/* ===============================
   NUMBER INPUTS (HMI FEEL)
   =============================== */

.hmi-number {
    text-align: center;
    font-family: Consolas, monospace;
    font-size: 0.8rem;
    padding-right: 6px;
}

/* ===============================
   ROW DENSITY
   =============================== */

.hmi-row {
    min-height: 32px;
}

/* ===============================
   HMI BASE STYLING
   =============================== */

.hmi-panel {
    background: #42586c;
    light industrial blue/grey border: 1px solid #344250;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.hmi-section-title {
    margin: 10px 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #333;
}

/* ===============================
   ROWS & LABELS
   =============================== */


.hmi-row {
    min-height: 32px;
    border-bottom: 2px solid #42586c;
}

    .hmi-row:last-child {
        border-bottom: none;
    }

.hmi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #ddd;
    white-space: nowrap;
}

/* ===============================
   INPUTS
   =============================== */

.hmi-input {
    height: 30px;
    font-size: 0.8rem;
    font-family:Dubai;
    padding: 2px 6px;
    background-color: #ffffff;
    color: #000;
    border: 1px solid #444;
}

    .hmi-input:focus {
        background-color: #ddd;
        border-color: #00aaff;
        box-shadow: none;
    }

/* ===============================
   READ-ONLY DISPLAYS
   =============================== */

.hmi-display {
    height: 30px;
    text-align: center;
    font-size: 0.8rem;
    padding: 4px 6px;
    background-color: #444;
    color: #00ff9c;
    border: 1px solid #333;
    font-family: Consolas, monospace;
}

/*===============================
   STATUS COLORS
   =============================== */

.hmi-on {
    background-color: #0a3;
    color: #fff;
}

.hmi-off {
    background-color: #800;
    color: #fff;
}


/* ===============================
   FLASH ANIMATION MONITOR
   =============================== */
@keyframes flash-monitor {
    0% {
        background-color: #42586c;
    }

    50% {
        background-color: #000000;
    }

    100% {
        background-color: #42586c;
    }
}

.flash-monitor {
    animation: flash-monitor 0.8s ease-in-out 2;
}

/* ===============================
   FLASH ANIMATION DOSING
   =============================== */

@keyframes flash-dosing {
    0% {
        background-color: #ddd;
    }

    50% {
        background-color: #fff3cd;
    }

    100% {
        background-color: #ddd;
    }
}

.flash-dosing {
    animation: flash-dosing 1s ease-in-out 2;
}

/* ===============================
   FLASH ANIMATION CYLINDERS
   =============================== */

@keyframes flash-cylinders {
    0% {
        background-color: #ddd;
    }

    50% {
        background-color: #fff3cd;
    }

    100% {
        background-color: #ddd;
    }
}

.flash-cylinders {
    animation: flash-cylinders 1s ease-in-out 2;
}




    /* ===============================
   AUTO LOADING ANIMATION
   =============================== */
    /* Container */
    .auto-refresh-indicator {
    display: flex;
    justify-content: center;
    padding: 6px 0 4px;
}

/* Track */
.loading-bar {
    width: 220px;
    height: 6px;
    background: #ddd0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

/* Motion wrapper (PING ↔ PONG) */
.loading-bar-move {
    position: absolute;
    width: 35%;
    height: 100%;
    animation: flame-slide 5.0s ease-in-out infinite;
}

/* Flame itself */
.loading-bar-flame {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient( 90deg, rgba(255, 180, 0, 0.1), rgba(255, 140, 0, 0.8), rgba(255, 90, 0, 1), rgba(255, 140, 0, 0.8), rgba(255, 180, 0, 0.1) );
    filter: blur(0.4px);
    box-shadow: 0 0 6px rgba(255, 140, 0, 0.8), 0 0 12px rgba(255, 90, 0, 0.6);
    animation: flame-flicker 0.35s ease-in-out infinite alternate;
}

/* Left ↔ Right motion */
@keyframes flame-slide {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(185px); /* track width - flame width */
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Flicker (NO translate here) */
@keyframes flame-flicker {
    from {
        opacity: 0.85;
        transform: scaleY(1);
    }

    to {
        opacity: 1;
        transform: scaleY(1.2);
    }
}







