.ventilation-widget {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    width: 100%;
    color: white;                                                                                                                                                                                   
}

.ventilation-name {
    margin-right: auto;
    font-size: 1.25rem;
}

.ventilation-content {
    display: flex;
    width: 100%;
    height: 80%;
    align-items: center;
    justify-content: center;
    gap:10%;
}

.ventilation-icon {
    height: 100%;
    max-height: 80px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ventilation-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 30%;
    font-size: 0.8rem;
}

.vent-info-line {
    text-align: center;
}

.ventilation-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.ventilation-icon.active {
    width: 12vh;
    aspect-ratio: 1 / 1;
    background-color: #00E5E2;
    -webkit-mask-image: url('/images/vent.png');
    mask-image: url('/images/vent.png');
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-position: center;
    animation: vent-spin 2s linear infinite;
    transform-origin: 50% 50%;
}

.ventilation-icon.active img {
    display: none;
}

@keyframes vent-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ventilation-toggles {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.ventilation-toggle {
    width: 100%;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-size: 0.95rem;
}

.ventilation-toggle.active {
    background: rgba(0, 229, 226, 0.3);
    border-color: #00E5E2;
    box-shadow: 0 0 1vh #00E5E2;
}





/* === MEDIA === */

/* Mobile  */

@media (max-width: 699px) {
    .ventilation-name {
        font-size: 0.95rem;
    }

    .ventilation-icon {
        max-height: 60px;
    }

    .ventilation-toggles {
        gap: 0.5rem;
    }

    .ventilation-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .ventilation-info {
        font-size: 0.85rem;
    }
}

/* WVGA / WVGA-Narrow (720x480, 800x480) */

@media (min-width: 700px) and (max-width: 880px) {
}

/* WSVGA / XGA (1024x600, 1024x768) */

@media (min-width: 881px) and (max-width: 1150px) {
    .ventilation-name {
        font-size: 0.95rem;
    }

    .ventilation-icon {
        max-height: 80px;
    }

    .ventilation-toggles {
        gap: 0.5rem;
    }

    .ventilation-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .ventilation-info {
        font-size: 0.85rem;
    }
}

/* WXGA / HD720 / SXGA (1280x720/800/1024) */

@media (min-width: 1151px) and (max-width: 1600px) {
    .ventilation-name {
        font-size: 0.95rem;
    }

    .ventilation-icon {
        max-height: 80px;
    }

    .ventilation-toggles {
        gap: 0.5rem;
    }

    .ventilation-toggle {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }

    .ventilation-info {
        font-size: 0.85rem;
    }
}

/* HD / WUXGA (1920x1080, 1920x1200) */

@media (min-width: 1601px) and (max-width: 2879px) {
    /* standard styles */
}

/* 4K (3840x2160) */

@media (min-width: 2880px) {

    .ventilation-name {
        font-size: 2rem;
    }

    .ventilation-icon {
        max-height: 160px;
    }

    .ventilation-toggles {
        gap: 1rem;
    }

    .ventilation-toggle {
        padding: 1rem 2rem;
        font-size: 2rem;
    }

    .ventilation-info {
        font-size: 1.75rem;
    }
}

/* Low height */

@media (min-width: 1000px) and (max-height: 650px) {
    .ventilation-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .ventilation-icon {
        max-height: 40px;
    }

    .ventilation-info {
        flex-direction: row;
        gap: 1rem;
    }

    .ventilation-toggles {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
    }

    .ventilation-toggle {
        width: fit-content;
        min-width: 4rem;
        padding: 0.25rem;
    }
}

/* Override for 1024x600 */

@media (width: 1024px) and (height: 600px) {
    .ventilation-content {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .ventilation-icon {
        max-height: 40px;
    }

    .ventilation-info {
        flex-direction: row;
        gap: 1rem;
    }

    .ventilation-toggles {
        width: 100%;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 0.25rem;
    }

    .ventilation-toggle {
        width: fit-content;
        min-width: 4rem;
        padding: 0.25rem;
    }
}