/* ===================================================================
   HIDROCHECK — COMPONENTES VISUAIS, ANIMAÇÕES & INTERAÇÕES
   =================================================================== */

/* --- Animações Hidráulicas (Ondas do Reservatório) --- */
@keyframes waveSlide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.wave-layer-1 {
    animation: waveSlide 8s linear infinite;
    will-change: transform;
}

.wave-layer-2 {
    animation: waveSlide 12s linear infinite reverse;
    will-change: transform;
}

/* Rotor do Sensor de Fluxo YF-S201 */
@keyframes rotorSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotor-spin {
    animation: rotorSpin 1.2s linear infinite;
    transform-origin: center center;
    will-change: transform;
}

/* --- Container e Banners de Notificação Push --- */
#push-notification-container {
    position: fixed;
    top: 1rem;
    left: 0;
    right: 0;
    z-index: 9999; /* Garante visibilidade acima de qualquer modal ou navegação */
    display: flex;
    justify-content: center;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    pointer-events: none;
}

@keyframes pushSlideDown {
    0% {
        transform: translateY(-160%);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.push-banner-enter {
    animation: pushSlideDown 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    will-change: transform, opacity;
}

@keyframes pushProgressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

.push-progress-bar {
    animation: pushProgressShrink 6s linear forwards;
    will-change: width;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 6rem;
    left: 0;
    right: 0;
    z-index: 9998;
    display: flex;
    justify-content: center;
    padding-left: 1rem;
    padding-right: 1rem;
    pointer-events: none;
}

@media (min-width: 768px) {
    #toast-container {
        bottom: 1.5rem;
    }
}

/* --- Sliders com Alto Contraste & Trilhas Dinâmicas --- */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #334155;
    outline: none;
    cursor: pointer;
    margin: 10px 0;
    touch-action: pan-y;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: transparent;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(56, 189, 248, 0.2);
    margin-top: -8px;
    border: 2.5px solid #ffffff;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"]::-moz-range-thumb {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 0 4px rgba(56, 189, 248, 0.2);
    border: 2.5px solid #ffffff;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.15);
    background: #0ea5e9;
}

input[type="range"]::-moz-range-thumb:active {
    transform: scale(1.15);
    background: #0ea5e9;
}
