﻿:root {
    --bg-color: #ffffff;
    --text-color-dark: #8a7151;
    --text-color-light: #faf9f8;
    --highlight-color: #C00;
    --success-color: #1fd17e;
    --button-color1: #4391cd;
    --button-color2: #3d8294;
    --button-color3: #17395f;
    --card-bg1: #fdfcfd;
    --hover-bg: #e2e6ea;
    --muted-text: #6c757d;
    --card-body-color: #f2f4f8;
}

.base {
    background-color: var(--bg-color);
    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;
}

.base .card-body {
    padding: 5px;
    background-color: var(--card-body-color) !important;
}

.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;
}

.popover {
    position: absolute;
    z-index: 1000;
    display: none;
    width: 400px;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

/* Custom styles for the icon grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
}

.icon-item {
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.icon-item:hover {
    background-color: #f0f0f0;
    border-radius: 5px;
}

/* Adjust dropdown menu to fit the icon grid */
.dropdown-menu {
    width: 300px;
    padding: 0;
}

/* Adjust the size of the icons */
.icon-item i {
    font-size: 24px;
}

/* Style for the selected icon in the button */
#selectedIcon {
    margin-right: 8px;
}


@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;
    }
}

body {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.screen-container {
    position: relative;
    width: 100%;
    height: auto;
}
.screen-image {
    width: 100%;
    height: auto;
}

.device-icon {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 100px; 
    height: 100px;
}

.device-icon svg {
    width: 100%;
    height: 100%;
}

.map-container {
    width: 100%;
    height: 100%;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.grid-stack-item-content {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    overflow: hidden; 
}
