﻿:root {
    --bg-dark-grey: #f5f3f1;
    --text-color-dark: #8a7151;
    --text-color-light: #f8f9fa;
    --highlight-color: #C00;
    --success-color: #1fd17e;
    --button-color1: #4391cd;
    --button-color2: #3d8294;
    --button-color3: #17395f;
    --card-bg1: #e8e2dc;
    --hover-bg: #e2e6ea;
    --muted-text: #6c757d;
}

.bg-dark-grey {
    background-color: var(--bg-dark-grey);
    color: var(--text-color-dark);
    height: 100vh;
}

.switch-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-switch .form-check-input {
    height: 24px;
    width: 48px;
}

.form-switch .form-check-input:focus {
    border-color: rgba(0, 0, 0, 0.25);
    outline: 0;
    box-shadow: none;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(0,0,0,0.25)'/></svg>");
}

.form-switch .form-check-input:checked {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
    border: none;
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba(255,255,255,1.0)'/></svg>");
}

.status-text {
    font-weight: bold;
}

.fa {
    margin: 0 10px;
}

.conn-success {
    color: var(--success-color);
}

.button1 {
    background-color: var(--button-color1);
    margin-right: 20px;
}

.button2 {
    background-color: var(--button-color2);
}

.button3 {
    background-color: var(--button-color3);
}

.card-header1 {
    background-color: var(--card-bg1);
    color: var(--text-color-dark);
}

.card-header2 {
    background-color: var(--button-color1);
    color: var(--text-color-light);
}

#tableBody {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    margin: 0 auto;
}

.custom-card {
    flex: 0 0 200px;
    width: 200px;
    margin: 8px;
}

.card-body {
    padding: 5px;
}

.custom-card h3 {
    margin-bottom: 10px;
}

@media screen and (max-width: 360px) {
    .custom-card {
        flex: 0 0 100%;
    }
}

.custom-card .table {
    --bs-table-bg: transparent;
    background-color: transparent;
    width: 100%;
}

.device-card {
    cursor: pointer;
    background-color: var(--text-color-light);
    transition: background-color 0.3s;
}

.device-card:hover {
    background-color: var(--hover-bg);
}

.state {
    font-size: 0.9em;
    color: var(--muted-text);
}

.device-card table {
    width: 100%;
}

.device-card td {
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 320px) {
    .device-card td {
        display: flex;
        justify-content: space-between;
    }

    .device-card td:first-child,
    .device-card td:last-child {
        width: 50%;
    }
}

@media (max-width: 650px) {
    #logo {
        display: none;
    }
}
