/* home.css — SmartHomeFacile hero page styles
   Estratto da home.php — mantenere in sync con home.js
   ============================================================ */

/* =====================================================
   GARAGE DOOR ANIMATION
===================================================== */
@keyframes garageDoorOpen {
    0%   { transform: translateY(0%); }
    100% { transform: translateY(-64%); }
}

@keyframes garageDoorClose {
    0%   { transform: translateY(-64%); }
    100% { transform: translateY(0%); }
}

@keyframes garageBeamSweep {
    0%   { opacity: 0; transform: translateY(20%); }
    28%  { opacity: 0.35; }
    100% { opacity: 0; transform: translateY(-16%); }
}

#hero-smart-image {
    transform: translateY(0%) scale(1);
    transform-origin: center bottom;
    will-change: transform;
}

#hero-smart-image.garage-open {
    transform: translateY(-64%);
}

#hero-smart-image.garage-opening {
    animation: garageDoorOpen 2s linear forwards;
}

#hero-smart-image.garage-closing {
    animation: garageDoorClose 2s linear forwards;
}

#garage-motion-glow {
    background:
      radial-gradient(circle at 50% 85%, rgba(255, 214, 128, 0.42) 0%, rgba(255, 214, 128, 0) 62%),
      linear-gradient(180deg, rgba(255, 184, 0, 0) 0%, rgba(255, 184, 0, 0.32) 50%, rgba(255, 184, 0, 0) 100%);
    mix-blend-mode: screen;
}

#garage-motion-glow.is-active {
    animation: garageBeamSweep 1.15s ease-out forwards;
}

/* =====================================================
   CURTAINS / TENDE
===================================================== */
#curtain-left, #curtain-right {
    background: rgba(30, 30, 42, 0.52);
    backdrop-filter: blur(1.5px);
    will-change: transform;
}

#tende-preview-left, #tende-preview-right {
    background: rgba(30, 30, 42, 0.52);
    will-change: transform;
}

/* =====================================================
   VACUUM ROBOT — LOCATE RINGS
===================================================== */
@keyframes vacuumPing {
    /* rings start at robot diameter (44 px) and expand outward */
    0%   { transform: translate(-50%, -50%) scale(1.0); opacity: 0.88; }
    100% { transform: translate(-50%, -50%) scale(3.4); opacity: 0; }
}

.vacuum-ring {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    border: 2.5px solid rgba(255, 184, 0, 0.9);
    animation: vacuumPing 1.6s ease-out forwards;
}

/* =====================================================
   AUTO ELETTRICA — CHARGE BAR
===================================================== */
@keyframes evChargePulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

#ev-charge-bar {
    background: linear-gradient(90deg, #22c55e, #86efac);
    animation: evChargePulse 2.4s ease-in-out infinite;
}

#ev-charge-bar.ev-charged {
    animation: none;
    background: #22c55e;
}

/* =====================================================
   CONDIZIONATORE — AC MODAL
===================================================== */

/* Toggle switch */
#ac-toggle {
    background-color: #7c5800; /* primary */
    transition: background-color 0.25s ease;
}
#ac-toggle[aria-pressed="false"] {
    background-color: #eae8e7; /* surface-container-high */
}
.dark #ac-toggle {
    background-color: #ffba20; /* primary-fixed-dim */
}
.dark #ac-toggle[aria-pressed="false"] {
    background-color: #24243A;
}

#ac-toggle-knob {
    transform: translateX(1.5rem);
    transition: transform 0.25s ease;
}
#ac-toggle[aria-pressed="false"] #ac-toggle-knob {
    transform: translateX(0.25rem);
}

/* Mode buttons */
.ac-mode-btn {
    padding: 0.625rem 0.375rem;
    border-radius: 0.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    border: 1.5px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background-color: #eae8e7;
    color: #1b1c1c;
}
.dark .ac-mode-btn {
    background-color: #24243A;
    color: #fffbff;
}
.ac-mode-btn.is-active {
    background-color: rgba(124, 88, 0, 0.12);
    color: #7c5800;
    border-color: rgba(124, 88, 0, 0.3);
}
.dark .ac-mode-btn.is-active {
    background-color: rgba(255, 186, 32, 0.15);
    color: #ffba20;
    border-color: rgba(255, 186, 32, 0.35);
}
.ac-mode-btn:disabled,
#ac-temp-minus:disabled,
#ac-temp-plus:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* =====================================================
   CLIMA — THERMOSTAT MODAL
===================================================== */
#clima-toggle {
    background-color: #7c5800;
    transition: background-color 0.25s ease;
}
#clima-toggle[aria-pressed="false"] {
    background-color: #eae8e7;
}
.dark #clima-toggle {
    background-color: #ffba20;
}
.dark #clima-toggle[aria-pressed="false"] {
    background-color: #24243A;
}
#clima-toggle-knob {
    transform: translateX(1.5rem);
    transition: transform 0.25s ease;
}
#clima-toggle[aria-pressed="false"] #clima-toggle-knob {
    transform: translateX(0.25rem);
}

.clima-mode-btn {
    padding: 0.75rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    border: 1.5px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    background-color: #eae8e7;
    color: #1b1c1c;
}
.dark .clima-mode-btn {
    background-color: #24243A;
    color: #fffbff;
}
.clima-mode-btn.is-active {
    background-color: rgba(93, 92, 116, 0.12);
    color: #5d5c74;
    border-color: rgba(93, 92, 116, 0.3);
}
.dark .clima-mode-btn.is-active {
    background-color: rgba(198, 196, 223, 0.15);
    color: #c6c4df;
    border-color: rgba(198, 196, 223, 0.35);
}
.clima-mode-btn:disabled,
#clima-temp-minus:disabled,
#clima-temp-plus:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}
