@import url("https://fonts.googleapis.com/css?family=Open+Sans|Quantico:700i|Montserrat:500");

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: sans-serif;
    overflow: hidden;
}

.header {
    display: flex;
    height: 50px;
    background: #333;
}

#login {
    flex: 1;
    border: 0;
}

#deviceselector {
    flex: 1;
    display: none;
    background: #333;
    color: #fff;
    font-size: 16px;
    padding: 8px;
}

#main {
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
}

#top {
    display: flex;
    flex: 1;
    max-height: 60%;
    overflow: hidden;
}

#telemetryblock {
    width: 25%;
    overflow-y: auto;
    background: #555;
    color: #fff;
    padding: 10px;

    /* 🔥 This line ensures it only takes half the vertical space */
    max-height: 100%;
}

#mapblock {
    width: 75%;
    height: 100%;
}

#map {
    width: 100%;
    height: 100%;
    border: 0;
}

#bottom {
    flex: 1;
    display: flex;
    overflow: hidden;
}
#graph-container {
    display: flex;
    flex-direction: column;
    position: relative;
    background: #222;
    color: white;
    padding: 10px;
    height: 100%;
}

/* Graph canvas full size */
#telemetryChart {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Layout wrapper */
.telemetry-layout {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .telemetry-layout {
        flex-direction: row;
        height: 100%;
    }

    #graph-container {
        flex: 3;
        height: auto;
    }


}

#controls {
    margin-bottom: 5px;
}

#controls button {
    margin: 2px;
    padding: 5px 10px;
    font-size: 12px;
}

canvas {
    flex: 1;
}

#telemetry-graphics {
    flex: 1;
    background: #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 6px;
    text-align: left;
    color: #fff;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.05);
}




/* horizontally center the main container */
#Telem_main {
    margin: 1rem auto 2rem;
    max-width: 350px;
        width: 90vw;
    border: 4px solid #e65c00;
    /* include stripes atop a dark background */
    background: repeating-linear-gradient(-42deg,
            hsla(0, 0%, 0%, 0.3) 0,
            hsla(0, 0%, 0%, 0.3) 4px,
            transparent 0,
            transparent 8px),
        #111;
    color: #fff;
    border-radius: 5px;
    /* position the header and visualization in a flex column */
    display: flex;
    flex-direction: column;
}

/* style the header with similar stripes, atop a red background */
#F1header {
    /* padding: 1rem; */
    text-align: center;
    background: repeating-linear-gradient(-42deg,
            hsla(0, 0%, 0%, 0.1) 0,
            hsla(0, 0%, 0%, 0.1) 2px,
            transparent 0,
            transparent 8px),
        #e65c00;
}

/* specify a noticeable shadow for the heading */
#F1header h1 {
    font-family: "Quantico", sans-serif;
    margin-top:0.3rem;
    margin-bottom: 0.3rem;
    font-size: 2rem;
    text-shadow: 3px 2px hsla(0, 0%, 0%, 1);
}

#F1header h2 {
    font-family: "Quantico", sans-serif;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
    text-shadow: 3px 2px hsla(0, 0%, 0%, 1);
}

/* ==========================
   MODE TOGGLE + BADGE
========================== */
#modeBadge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    color: #fff;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(40, 167, 69, 0.7);
    /* default: green for Live */
    transition: background 0.3s ease, color 0.3s ease;
    pointer-events: none;
    /* don't block mouse events */
}

#modeToggle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease, transform 0.2s ease;
}

#modeToggle:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
}