/* Light and Building - Room Display Styles */

/* Neue Haas Grotesk Fonts */
@font-face {
    font-family: "NeueHaasGroteskDisp";
    src: url("../fonts/NeueHaasGrotesk2020/NeueHaasGroteskDispW05-45Lt.woff2")
            format("woff2"),
        url("../fonts/NeueHaasGrotesk2020/NeueHaasGroteskDispW05-45Lt.woff")
            format("woff"),
        url("../fonts/NeueHaasGrotesk2020/NHaasGroteskDSPro-45Lt.ttf")
            format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "NeueHaasGroteskText";
    src: url("../fonts/NeueHaasGrotesk2020/NeueHaasGroteskTextW05-55Rm.woff2")
            format("woff2"),
        url("../fonts/NeueHaasGrotesk2020/NeueHaasGroteskTextW05-55Rm.woff")
            format("woff"),
        url("../fonts/NeueHaasGrotesk2020/NeueHaasGroteskTextW05-55Rm.ttf")
            format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    font-family: "NeueHaasGroteskText", -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #1a1a1a;
}

#app {
    height: 100%;
    width: 100%;
}

.text-lg {
    font-family: "NeueHaasGroteskDisp", Arial, Helvetica, sans-serif;
    font-size: 35px;
}

.text {
    font-family: "NeueHaasGroteskText", Arial, Helvetica, sans-serif;
    font-size: 14px;
}

.lab-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Background Room Image */
.room-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.room-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: opacity 0.5s ease;
}

/* Sensor Sidebar */
.sensor-sidebar {
    position: absolute;
    left: 30px;
    bottom: 57px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    /* backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); */
    border-radius: 17px;
    padding: 20px 0px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    min-width: 290px;
}

/* Sensor Row */
.sensor-row {
    display: flex;
    align-items: center;
    height: 82px;
    width: 290px;
    padding: 0px 40px;
}

.sensor-icon {
    width: 80px;
    color: #666;
    flex-shrink: 0;
}

.sensor-icon > img {
    width: 50px;
    height: 50px;
}

.sensor-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 130px;
}

.sensor-value {
    font-family: "NeueHaasGroteskDisp", Arial, Helvetica, sans-serif;
    font-size: 35px;
}

.sensor-unit {
    font-family: "NeueHaasGroteskDisp", Arial, Helvetica, sans-serif;
    font-size: 35px;
}

.sensor-label {
    font-family: "NeueHaasGroteskText", Arial, Helvetica, sans-serif;
    font-size: 14px;
}

/* Presence Icons */
.presence-icons {
    display: flex;
    gap: 4px;
    margin-bottom: 2px;
}

.presence-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.presence-dot.active {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
}

.presence-dot::before {
    content: "";
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 4px;
}

.presence-dot::after {
    content: "";
    width: 16px;
    height: 8px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    position: absolute;
    bottom: 3px;
}

/* Timeline Bar */
.timeline-bar {
    position: absolute;
    bottom: 57px;
    left: calc(290px + 30px + 48px);
    right: 30px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 24px;
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
}

.timeline-slider {
    flex: 1;
    position: relative;
    height: 34px;
    display: flex;
    align-items: center;
}

.slider-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 12px;
    background: #969696;
    border-radius: 2px;
}

.slider-progress {
    position: absolute;
    left: 0;
    height: 12px;
    background: #fff;
    border-radius: 5px;
    width: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timeline-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
    margin: 0;
}

.slider-thumb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #fff;
    border: none;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Refresh Pulse Animation */
@keyframes refreshPulse {
    0% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 8px 32px rgba(79, 195, 247, 0.4),
            0 0 20px rgba(79, 195, 247, 0.3);
    }
    100% {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }
}

.sensor-sidebar.refreshing {
    animation: refreshPulse 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .sensor-sidebar {
        left: 12px;
        padding: 16px 18px;
        gap: 16px;
        min-width: 150px;
    }

    .sensor-value {
        font-size: 1.5rem;
    }

    .timeline-bar {
        left: 12px;
        right: 12px;
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .sensor-sidebar {
        top: auto;
        bottom: 100px;
        left: 12px;
        right: 12px;
        transform: none;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .sensor-row {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}
