﻿.input-group {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.input-group .form-control,
.input-group .input-group-text {
    border: none;
    box-shadow: none;
}

.input-group:focus-within {
    border: 1px solid #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); /* Bootstrap default focus ring */
}

.btn {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.form-control {
    font-size: inherit !important
}

.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinner {
    -moz-appearance: textfield;
}


/* Side Panel Styles */

.LSside-panel {
    position: fixed !important;
    top: 0 !important;
    right: -50% !important;
    height: 100vh !important;
    background: var(--bs-body-bg, #ffffff) !important;
    border-left: var(--bs-border-width, 1px) solid var(--bs-border-color, #dee2e6) !important;    
    z-index: 1055 !important; /* Higher than Bootstrap modal backdrop (1050) */
    padding: var(--bs-spacer, 1.25rem) !important;
    box-shadow: -2px 0 0.5rem rgba(0, 0, 0, 0.15) !important;
    overflow: hidden !important;
    display: none;
}

    .LSside-panel.show {
        right: 0 !important;
        display: block;
        transition: right 0.3s ease !important;
    }

    .LSside-panel .side-panel-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-bottom: var(--bs-spacer, 1.25rem) !important;
        padding-bottom: calc(var(--bs-spacer, 1.25rem) * 0.75) !important;
        border-bottom: var(--bs-border-width, 1px) solid var(--bs-border-color, #dee2e6) !important;        
    }

    .LSside-panel .side-panel-content {
        height: calc(100vh - 6rem) !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding-right: 0.5rem !important; /* Space for scrollbar */
    }

    /* Ensure Bootstrap components work properly inside side panel */
    .LSside-panel .table {
        margin-bottom: 0 !important;
    }

    .LSside-panel .btn {
        white-space: nowrap !important;
    }

    .LSside-panel .form-control,
    .LSside-panel .form-select,
    .LSside-panel .form-check-input {
        font-size: var(--bs-body-font-size, 1rem) !important;
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .LSside-panel {
        width: 85% !important;
        right: -85% !important;
    }
}

@media (max-width: 576px) {
    .LSside-panel {
        width: 95% !important;
        right: -95% !important;
    }
}
}

/* treeview styles */

.treeview-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    background: white;
}

    .treeview-container.with-border {
        border: 1px solid #e1e5e9;
        border-radius: 6px;
    }

    .treeview-container.no-border {
        border: none;
        border-radius: 0;
    }

.filter-box {
    padding: 12px;
    background-color: #f8f9fa;
}

.treeview-container.with-border .filter-box {
    border-bottom: 1px solid #e1e5e9;
}

.treeview-filter {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .treeview-filter.with-border {
        border: 1px solid #ced4da;
    }

    .treeview-filter.no-border {
        border: none;
    }

    .treeview-filter.with-border:focus {
        color: #495057;
        background-color: #fff;
        border-color: #80bdff;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .treeview-filter.no-border:focus {
        color: #495057;
        background-color: #fff;
        outline: 0;
        box-shadow: none;
    }

.tree-container {
    padding: 8px;
}

    .tree-container.fixed-height {
        max-height: 400px;
        overflow-y: auto;
    }

    .tree-container.auto-height {
        max-height: none;
        overflow-y: visible;
    }

.tree-node {
    margin: 0;
}

.node-content {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    user-select: none;
}

    .node-content:hover {
        background-color: #f8f9fa;
    }

.expand-icon, .leaf-icon {
    width: 20px;
    margin-right: 8px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-icon {
    cursor: pointer;
}

.icon {
    font-size: 12px;
    color: #6c757d;
}

.node-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.children {
    margin-left: 24px;
    border-left: 1px solid #e9ecef;
    padding-left: 8px;
    margin-top: 2px;
}

mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 500;
}

/* Custom leaf templates */
.tree-link {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

    .tree-link:hover {
        color: #0056b3;
        text-decoration: underline;
    }

.tree-label {
    color: #495057;
}

.custom-leaf {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.custom-icon {
    font-size: 14px;
    margin-right: 4px;
}

.btn-small {
    padding: 2px 6px;
    font-size: 11px;
    background: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

    .btn-small:hover {
        background: #dee2e6;
    }

/* Spacing between examples */
h4 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #495057;
    font-size: 16px;
}



.xs-label {
    font-size: 0.75rem; /* 12px */
    font-weight: normal;
    margin-bottom: 0;
}

.ls-label {   
    margin-bottom: 0;
    padding:0;
}

/* Container to control scroll */
.table-scroll-container {
    max-height: 100%; /* adjust as needed */
    overflow-y: auto;
    width: 100%;
    color: black;
}

/* Make table header sticky */
.table-scroll-container thead th {
    position: sticky;
    top: 0;
    background: #f8f9fa;
    z-index: 2;
}

.table-scroll {
    width: 100%;
    border-collapse: collapse;
}

.table-scroll th,
.table-scroll td {
    padding: 8px 12px;
    border-bottom: 1px solid;
}


.LSFull-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    padding: 4px;
    background-color: white;
    z-index: 9999;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    pointer-events: none;
}

.LSFull-panel.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
