/* General Theme Settings */
:root {
    --bs-primary-rgb: 0, 126, 255; /* Equivalent to #314b32 */
    --bs-bg-opacity: 1; /* Default opacity for backgrounds */
    --primary-color: #007eff; /* Main theme color */
    --secondary-color: #6c757d; /* Secondary color */
    --background-color: #f8f9fa; /* App background color */
    --text-color: #212529; /* Default text color */
    --header-bg: var(--primary-color); /* Header background */
    --header-text-color: #ffffff; /* Header text color */
    --footer-bg: #007eff; /* Footer background color */
    --footer-text-color: #ffffff; /* Footer text color */
}

/* Global Styles */
body {
    background-color: var(--background-color) !important;
    color: var(--text-color) !important;
    font-family: 'Roboto', sans-serif !important;
    margin: 0;
    padding: 0;
}

/* Header */
header {
    background-color: var(--header-bg) !important;
    color: var(--header-text-color) !important;
    text-align: center !important;
    padding: 1rem 0 !important;
}

header h1 img {
    max-height: 50px !important;
}

.bg-primary {
   
    background-color: rgb(255 255 255) !important;
}

/* Footer */
footer {
    background-color: var(--footer-bg) !important;
    color: var(--footer-text-color) !important;
    border-top: 1px solid #e0e0e0 !important;
    padding: 0.35rem 0 !important;
}

footer a {
    color: var(--footer-text-color) !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}

footer a:hover {
    color: #cecece !important;
}

/* Bottom Navigation Menu */
footer .d-flex a {
    flex-grow: 1 !important;
    text-align: center !important;
}

footer .d-flex i {
    font-size: 1.5rem !important;
    display: block !important;
}

footer .d-flex p {
    font-size: 0.75rem !important;
    margin: 0 !important;
}

.mobile-footer-nav {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

.footer-version {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.5rem;
    line-height: 1.1;
    color: #b9d5f3;
    opacity: 0.78;
    font-weight: 500;
    padding-bottom: 0.12rem;
}

/* Buttons */
button {
    padding: 0.5rem 1rem !important;
    border-radius: 9px !important;
    cursor: pointer !important;
    font-weight: 900 !important;
}

/* Forms */
form label {
    font-weight: bold !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

form input {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 0.5rem !important;
}

.pb-10{padding-bottom: 100px;}

.refactor-page-header {
    margin-bottom: 0.75rem;
}

.refactor-page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.refactor-page-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid #d9e1ea;
}

.refactor-page-actions .btn {
    padding: 0.28rem 0.55rem !important;
    font-size: 0.8rem;
    line-height: 1.15;
}

.refactor-top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 999px !important;
    border-color: #c7d3e2 !important;
    background: #fff;
    color: #31465d;
    min-height: 2rem;
    box-sizing: border-box;
}

.refactor-top-btn i {
    font-size: 0.8rem;
    opacity: 0.9;
}

.refactor-top-btn:hover,
.refactor-top-btn:focus {
    background: #eef4fb;
    border-color: #adc2da !important;
    color: #223142;
}

.groups-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.group-column {
    min-width: 0;
    margin: 0;
}

.group-shell {
    border: 1px solid #d7dee7;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #f9fbfd 0%, #f2f6fa 100%);
}

.group-shell.is-collapsed {
    background: linear-gradient(180deg, #f9fbfd 0%, #f7fafc 100%);
}

.group-shell-body {
    padding: 0.8rem;
}

.group-shell-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(117, 134, 152, 0.18);
}

.group-shell-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #223142;
    line-height: 1.2;
    cursor: pointer;
}

.group-shell-meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.group-shell-meta .badge {
    font-weight: 500;
    color: #4e6072;
}

.group-shell-toggle {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
}

.group-shell-toggle-icon {
    display: inline-block;
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.group-shell-toggle[aria-expanded="false"] .group-shell-toggle-icon {
    transform: rotate(-90deg);
}

.group-shell.is-collapsed .group-shell-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom-color: transparent;
}

.group-sort-controls {
    display: none;
    gap: 0.35rem;
    flex-shrink: 0;
}

.family-sort-controls {
    display: none;
    gap: 0.25rem;
    flex-shrink: 0;
}

.group-sort-trigger {
    padding: 0.35rem 0.55rem !important;
    border-radius: 10px !important;
    line-height: 1;
}

.group-header-actions {
    gap: 0.35rem;
}

.group-header-actions .group-sort-trigger {
    margin-right: 0 !important;
}

.group-manage-trigger {
    padding: 0.35rem 0.55rem !important;
    border-radius: 10px !important;
    line-height: 1;
}

.group-sort-trigger.active,
.family-sort-trigger.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.groups-masonry.group-sort-mode .group-sort-controls {
    display: flex;
}

.groups-masonry.group-sort-mode .group-column > .group-shell {
    outline: 2px dashed rgba(0, 126, 255, 0.35);
}

.group-column.family-sort-mode .family-sort-controls {
    display: inline-flex;
}

.group-column.family-sort-mode .group-items {
    outline: 2px dashed rgba(0, 126, 255, 0.2);
    outline-offset: 4px;
}

.group-sort-controls .btn {
    padding: 0.2rem 0.45rem !important;
    border-radius: 8px !important;
    font-size: 0.75rem;
    line-height: 1;
}

.family-sort-controls .btn,
.family-sort-trigger {
    padding: 0.2rem 0.45rem !important;
    border-radius: 8px !important;
    font-size: 0.75rem;
    line-height: 1;
}

.min-w-0 {
    min-width: 0;
}

@media (min-width: 992px) {
    .groups-masonry {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .groups-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .groups-masonry {
        grid-template-columns: 1fr;
    }

    .refactor-page-title {
        font-size: 1.15rem;
    }

    .refactor-page-actions {
        gap: 0.32rem;
        padding-bottom: 0.45rem;
    }

    .refactor-page-actions .btn {
        padding: 0.26rem 0.46rem !important;
        font-size: 0.74rem;
        min-height: 2rem !important;
        border-radius: 999px !important;
    }

    .refactor-top-btn i {
        font-size: 0.74rem;
    }

    .refactor-page-actions .btn.refactor-top-btn,
    .refactor-page-actions a.btn.refactor-top-btn,
    .refactor-page-actions button.refactor-top-btn {
        min-height: 2rem !important;
        padding: 0.26rem 0.46rem !important;
        border-radius: 999px !important;
        line-height: 1.1 !important;
    }

    .group-sort-controls .btn {
        padding: 0.45rem 0.6rem !important;
        font-size: 0.95rem;
    }

    .group-sort-trigger {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.95rem;
    }

    .family-sort-controls .btn,
    .family-sort-trigger {
        padding: 0.4rem 0.55rem !important;
        font-size: 0.9rem;
    }

    .group-manage-trigger {
        padding: 0.45rem 0.65rem !important;
        font-size: 0.95rem;
    }
}

h2{font-weight: 900 !important;}
h5{font-weight: 900 !important;}

.card{border-radius: 25px !important;border:0px !important;}
.card-text{font-weight: 100 !important;}

.status-circle {
    position: absolute;
    bottom: 20px;       /* Adjust to your preferred spacing */
    right: 20px;        /* Adjust to your preferred spacing */
           /* Circle diameter */
    ;       /* Circle diameter */
    border-radius: 6px;
    /* By default, the example uses Bootstrap's "bg-success" class for a green color.
       If you'd like a custom color, comment out the next line and replace with background-color: #whatever;
    */
    /* background-color: #28a745; */
}
.dataTables_filter {
    margin-bottom: 15px !important;
}

@media (min-width: 768px) {
    footer {
        display: none;
    }
    
.bg-primary {
   
    background-color: rgb(0 126 255) !important;
}
    .nav-link {    
        color: #FFFFFF !important;
    }
}
@media (max-width: 767.98px) {
    .navbarNav {
        display: none;
    }

    footer {
        padding: 0.2rem 0 !important;
    }

    footer .d-flex i {
        font-size: 1.15rem !important;
    }

    footer .d-flex p {
        font-size: 0.68rem !important;
        line-height: 1.1;
    }

    .mobile-footer-nav {
        padding-top: 0.22rem;
        padding-bottom: 0.1rem;
    }

    footer .mobile-footer-nav a {
        padding-top: 0.08rem;
    }

    main {
        height: calc(100% - 156px);
        overflow: scroll;
    }
}

  /* Global styles for dynamic layout */
        html, body {
            height: 100%;
            margin: 0;
            padding: 0;
        }



        #boxMap {
            height: 100%; /* Fill the remaining height in main */
            width: 100%; /* Full width */
        }

        header {
            height: 90px; /* Set the header height */
        }
/* Animation for button feedback */
.button-activated {
    animation: pulse-effect 0.3s ease-out;
    transform: scale(1.1); /* Temporary scaling */
    background-color: #28a745 !important; /* Flash green */
    color: #fff !important;
}

@keyframes pulse-effect {
    0% {
        transform: scale(1);
        background-color: inherit;
    }
    50% {
        transform: scale(1.1);
        background-color: #28a745;
    }
    100% {
        transform: scale(1);
        background-color: inherit;
    }
}

/* Styling for dashed drop zones (visible only in edit mode) */
.group-items {
    min-height: 50px;
    border: 2px dashed transparent;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.devices-layout {
    min-height: calc(100vh - 160px);
}

.devices-layout .col-md-9 {
    display: flex;
    flex-direction: row;
}

.devices-layout .group-items {
    min-height: calc(100vh - 220px);
    display: flex;
    flex-direction: row;
}

.family-name {
    padding-right: 0.8rem !important;
    font-size: 0.95rem;
}

.family-grid {
    flex: 1;
}

.family-card {
    border: 1px solid #dde4ec;
    border-radius: 0.8rem;
    background: #ffffff;
}

.family-card .card-body {
    display: block;
    padding: 0.85rem;
}

.family-members {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.member-row {
    background: #f8fafc;
    border: 1px solid #d9e1ea;
    border-radius: 0.65rem;
    padding: 0.45rem 0.55rem;
}

.member-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.member-title {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2a37;
    line-height: 1.2;
}

.output-button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.4rem;
}

.output-chip {
    background: #f4f7fb;
    border: 1px solid #d9e1ea;
    border-radius: 0.65rem;
    padding: 0.45rem;
}

.output-chip-head {
    font-size: 0.76rem;
    font-weight: 600;
    color: #49576a;
    margin-bottom: 0.25rem;
    line-height: 1.15;
}

.output-chip .open-access {
    width: 100%;
    padding: 0.22rem 0.45rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.member-row-status {
    margin-top: 0.25rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.member-status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    display: inline-block;
}

.member-status-label {
    font-weight: 500;
    font-size: 0.72rem;
    padding: 0.2rem 0.4rem;
}

.family-actions {
    gap: 0.5rem;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
}

.family-member-tile {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: 160px;
}

.family-member-tile .btn {
    margin-top: auto;
}

@media (max-width: 767.98px) {
    .devices-layout {
        min-height: auto;
    }

    .devices-layout .group-items {
        min-height: auto;
    }

    .group-shell-body {
        padding: 0.65rem;
    }

    .group-shell-header {
        margin-bottom: 0.5rem;
        padding-bottom: 0.45rem;
    }

    .member-row-top {
        flex-direction: column;
        align-items: stretch;
    }

    .output-button-grid {
        grid-template-columns: 1fr;
    }
}

.dropzone-visible {
    border-color: #007bff;
}

/* Visual feedback for draggable items */
.draggable-card {
    cursor: default;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.draggable-enabled {
    cursor: grab;
    opacity: 1;
}

.draggable-enabled:active {
    cursor: grabbing;
}

.draggable-card.dragging {
    opacity: 0.5;
}

.draggable-member.dragging {
    opacity: 0.5;
}

.draggable-family {
    cursor: grab;
}

.draggable-family:active {
    cursor: grabbing;
}

.draggable-family.dragging {
    opacity: 0.5;
}

.family-dropzone.dropzone-visible {
    border: 2px dashed #007eff;
}

.group-items.dropzone-visible {
    border: 2px dashed #007eff;
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.input-widget .output-card {
    cursor: grab;
    border-radius: 10px;
    transition: all 0.2s ease-in-out;
}

.input-widget:active {
    cursor: grabbing;
    transform: scale(1.02);
}

.input-status-circle {
    width: 25px;
    height: 25px;
    border-radius: 50%;
}