/* dark.css */


:root {

    --col_info: white;
    --col_info_bg: #0c276b;

    --col_warn: black;
    --col_warn_bg: #efefa3;

    --col_err: yellow;
    --col_err_bg: red;
}


body {
    font-family: sans-serif;
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #121212;
    color: #e0e0e0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' version='1.1' height='30px' width='90px' fill-opacity='0.02'><text x='0' y='20' fill='white' font-size='22'>101010</text></svg>");

}


div.top {
    color: white;
    display: flex;
    flex-grow: 0;
    background: #16793e;
    font-size: large;
    padding: 10px;
}

a.top {
    color: white;
}

div.fuss {
    display: flex;
    bottom: 0;
    font-size: medium;
    padding: 5px 10px;
    background: #16793e;
}


#panAppLogin {
    flex: 1;
    /*background: #00aa66;*/

    display: flex;
    justify-content: center; /* horizontal */
    align-items: center; /* vertikal */
}

#panLogin {
    width: 40vw;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: #195d2a;
    border: 3px solid #555; /* Rahmen */
    border-radius: 12px; /* abgerundete Ecken */
}

#panLogin label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 80%;
}

#panLogin input {
    width: 100%;
    margin-top: 4px;
    box-sizing: border-box;
}


#panApp {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    /*background: #181818;*/
}

.panel {
    border-top: 1px solid #444;
    padding: 6px;
    box-sizing: border-box;
    background: #202020;
}

#panUsers {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    color: #e6e6e6;
    padding: 6px 10px;
    font-weight: bold;
}

#panChat {
    background: #222;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#panChatRow {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}


#chatLeft {
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    min-width: 0;
}

#chatButtons {
    padding-top: 5px;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}


.icon {
    width: 38px;
    height: 38px;
    padding: 2px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}


#tfMessage {
    width: 50vw;
    flex: 1 1 50%;
    padding: 4px;
    min-height: 2.4em;
    background: #2e2e2e;
    color: #e0e0e0;
    border: 1px solid #555;
}

#listChat {
    flex: 1;
    height: 76px;
    background: #303030;
    border: 1px solid #303030;
    padding: 6px;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-y: auto;
    white-space: pre-wrap;
    color: #ffeec0;
}

#btSendMessage {
    height: 2.4em;
    background: #333;
    color: #eee;
    border: 1px solid #555;
}

#btSendMessage:hover {
    background: #444;
}


#panVideo {
    flex: 0 0 auto;
    display: flex;
    background: #2c3f61;
}

video {
    width: 25vw;
    aspect-ratio: 4/3;
    background: #101010;
    border-color: #00aa66;
    border-style: solid;
    border-width: 1px;
    box-sizing: border-box; /* entscheidend! */
}


#panLabels {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-around;
    background: #154b20;
    gap: 10px;
    color: white;
}


#panLogAndButtons {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    overflow: hidden;
}


#panLog {
    flex: 1 1 auto;
    overflow-y: auto; /* nur der Log-Inhalt scrollt */
    background: #2e5635;
    font-family: monospace;
    white-space: pre-wrap;
    color: #d0ffd0;
    padding: 4px;
}

#buttonRow {
    flex: 0 0 auto; /* feste Höhe, bleibt sichtbar */
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 6px;
    background: #1a1a1a;
    border-top: 1px solid #444;
}

.spacer {
    flex: 1;
}

button {
    padding: 8px 12px;
    font-size: 1rem;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px;
    cursor: pointer;
}




button:hover {
    background: #444;
}

button.toggle-on {
    background-color: #c97a00;
    color: #fff;
}

button:disabled {
    background: #222;
    color: #777;
    border: 1px solid #444;
    cursor: not-allowed;
    opacity: 0.6; /* leicht ausgegraut */
}

/* --------------- DIALOG ---------------------------------------- */


.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .55);
    z-index: 9999
}

.modal[hidden] {
    display: none
}

.modal-box {
    min-width: 280px;
    max-width: 90vw;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6)
}

.modal-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #e0e0e0
}

.modal-text {
    margin-bottom: 12px;
    color: #ddd
}

.modal-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end
}

.modal-buttons button {
    padding: 8px 12px;
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
    border-radius: 4px
}

.modal-buttons button:hover {
    background: #444
}
