﻿:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --filter-panel-bg: #f8f9fa;
    --border-color: #dee2e6;
}

/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: var(--dark-color);
    height: 100vh;
    overflow: hidden;
}*/

.app-container {
    display: flex;
    height: 726pt;
}

/* Filter Panel Styles */
.filter-panel {
    width: 350px;
    background-color: var(--filter-panel-bg);
    /*border-right: 1px solid var(--border-color);*/
    border: 1px solid  var(--border-color);
    /*border-radius: 8px;*/
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.filter-panel.collapsed {
    width: 50px;
    display:none;
}

.filter-panel-header {
    padding: 15px;
    background-color: #74943D;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    scrollbar-width: thin;
    /*scrollbar-color: #74953D #E2B23D;*/
}

.filter-section {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

    .filter-section:last-child {
        border-bottom: none;
    }

.filter-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.filter-item {
    margin-bottom: 15px;
    position: relative;
}

    .filter-item label {
        display: block;
        margin-bottom: 5px;
        font-weight: 500;
        font-size: 0.9rem;
    }

.range-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-input {
    flex: 1;
}

.range-slider {
    width: 100%;
    margin: 10px 0;
}

/* Results Panel Styles */
.results-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.results-header {
    padding: 15px 20px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-content {
    flex: 1;
    overflow-y: auto;
    /*padding: 20px;*/
    /*margin-left: 20px;*/
    border: 1px solid #e2e8f0;
    /*border-radius: 8px;*/
    scrollbar-width: thin;
    /*scrollbar-color: #74953D #E2B23D;*/
}

.table-container {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.table-actions {
    padding: 15px;
    background-color: var(--light-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table th, .data-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid var(--border-color);
    }

    .data-table th {
        background-color: var(--light-color);
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 10;
    }

        .data-table th i {
            margin-left: 5px;
            cursor: pointer;
            opacity: 0.5;
        }

            .data-table th i:hover {
                opacity: 1;
            }

    .data-table tr:hover {
        background-color: rgba(13, 110, 253, 0.05);
    }

    .data-table tr.selected {
        background-color: rgba(13, 110, 253, 0.1);
    }

.pagination-container {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Form Controls */
.form-control, .form-select {
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

    .form-control:focus, .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

/* Buttons */
.btn {
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 500;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: #0b5ed7;
        border-color: #0a58ca;
    }

    .btn-primary:disabled {
        background-color: #6c757d;
        border-color: #6c757d;
    }

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-outline-primary:hover {
        background-color: var(--primary-color);
        color: white;
    }

.btn-sm {
    padding: 5px 10px;
    font-size: 0.875rem;
}

/* Toggle Switch */
.form-switch {
    display: flex;
    align-items: center;
}

    .form-switch .form-check-input {
        width: 3em;
        height: 1.5em;
        margin-left: 0;
    }

/* Filter Settings */
.filter-settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .filter-settings-item:hover {
        background-color: rgba(13, 110, 253, 0.1);
    }

    .filter-settings-item.added {
        background-color: rgba(25, 135, 84, 0.1);
        color: var(--success-color);
    }

/* Custom Range Slider */
.range-slider-container {
    position: relative;
    margin: 15px 0;
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #FFC01E;
    outline: none;
}

    .range-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #FFC01E;
        cursor: pointer;
    }

    .range-slider::-moz-range-thumb {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #FFC01E;
        cursor: pointer;
    }

/* Dual Range Slider */
.dual-range-container {
    position: relative;
    margin: 20px 0;
}

.dual-range-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: var(--border-color);
    border-radius: 5px;
}

.dual-range-fill {
    position: absolute;
    height: 5px;
    background: #FFC01E;
    border-radius: 5px;
}

.dual-range-input {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

    .dual-range-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #FFC01E;
        cursor: pointer;
        pointer-events: all;
    }

    .dual-range-input::-moz-range-thumb {
        width: 15px;
        height: 15px;
        border-radius: 50%;
        background: #FFC01E;
        cursor: pointer;
        pointer-events: all;
    }

.dual-range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* Company Search Results */
.company-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

    .company-search-results.show {
        display: block;
    }

.company-search-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

    .company-search-item:hover {
        background-color: var(--light-color);
    }

    .company-search-item:last-child {
        border-bottom: none;
    }

/* Column Selector */
.column-selector {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 200px;
    z-index: 1000;
    display: none;
}

    .column-selector.show {
        display: block;
    }

.column-selector-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

    .column-selector-item:hover {
        background-color: var(--light-color);
    }

    .column-selector-item input {
        margin-right: 8px;
    }

/* Loading Spinner */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner-border {
    width: 1rem;
    height: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-panel {
        width: 100%;
        position: absolute;
        z-index: 1000;
        height: 100%;
    }

        .filter-panel.collapsed {
            width: 0;
        }

    .results-panel {
        width: 100%;
    }
}

/* High contrast adjustments */
.high-contrast {
    --primary-color: #0056b3;
    --secondary-color: #495057;
    --success-color: #0f5132;
    --info-color: #055160;
    --warning-color: #997404;
    --danger-color: #842029;
    --light-color: #e9ecef;
    --dark-color: #000;
    --filter-panel-bg: #e9ecef;
    --border-color: #000;
}

    .high-contrast .filter-panel {
        border-right: 2px solid var(--border-color);
    }

    .high-contrast .data-table th,
    .high-contrast .data-table td {
        border-bottom: 2px solid var(--border-color);
    }

/* Accessibility focus styles */
/**:focus {
    outline: 2px solid #FFC01E;
    outline-offset: 2px;
}*/

/* Drag and drop styles */
.filter-item.dragging {
    opacity: 0.5;
}

.filter-item.drag-over {
    border-top: 2px solid var(--primary-color);
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

    .tooltip .tooltiptext {
        visibility: hidden;
        width: 200px;
        background-color: var(--dark-color);
        color: white;
        text-align: center;
        border-radius: 6px;
        padding: 8px;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -100px;
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 0.8rem;
    }

    .tooltip:hover .tooltiptext {
        visibility: visible;
        opacity: 1;
    }

/* Panel toggle button enhancement */
.panel-toggle-btn {
    position: relative;
    /*left: 360px;*/
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    /*background-color: var(--primary-color);
    color: white;*/
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 7px 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 145px;
    writing-mode: tb-rl;
}

    .panel-toggle-btn.collapsed {
        left: 0;
        border-radius: 0 4px 4px 0;
    }

    /*.panel-toggle-btn:hover {
        background-color: #0b5ed7;
    }*/

/* Additional Filters Popup */
/*.additional-filters-popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 300px;
    z-index: 1000;
    display: none;
}

    .additional-filters-popup.show {
        display: block;
    }*/
.additional-filters-popup {
    position: absolute;
    bottom: 100%; /* place above the button */
    left: 0;
    transform: translateY(-8px); /* small gap */
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 100%;/*300px;*/
    z-index: 1000;
    display: none;
}

    .additional-filters-popup.show {
        display: block;
    }


.additional-filters-header {
    padding: 10px 15px;
    background-color: #74943D;
    color: white;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.additional-filters-body {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    /*scrollbar-color: #74953D #E2B23D;*/
}

.filter-checkbox-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
}

    .filter-checkbox-item:last-child {
        border-bottom: none;
    }

    .filter-checkbox-item:hover {
        background-color: var(--light-color);
    }

    .filter-checkbox-item input {
        margin-right: 10px;
    }

.add-filters-btn {
    width: 100%;
    border-radius: 0 0 8px 8px;
}

.header-section {
    /*border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1rem;*/
}

.dropdown-columns .dropdown-menu {
    width: 200px;
    max-height: 460px;
}

#listBoxContentinnerListBoxfilterPeerGroupDropDown_CPG.jqx-listbox-content-element,
#listBoxContentinnerListBoxfilterSectorDropDown_CPG.jqx-listbox-content-element,
#listBoxContentinnerListBoxfilterGroupDropDown_CPG.jqx-listbox-content-element,
#listBoxContentinnerListBoxfilterIndustryDropDown_CPG.jqx-listbox-content-element,
#listBoxContentinnerListBoxfilterSubIndustryDropDown_CPG.jqx-listbox-content-element {
    top: 27pt !important;
}

.jqx-grid-cell {
    border-bottom: 1px solid #d1d1d1 !important;
    border-right: 1px solid #d1d1d1 !important;
}

.group-name-truncate {
    display: inline-block;
    /*max-width: 220px;*/ /* adjust width to fit your layout */
    white-space: nowrap; /* prevents wrapping */
    overflow: hidden; /* hides extra text */
    text-overflow: ellipsis; /* shows "..." */
    vertical-align: bottom;
}
@media (max-width: 1429px) {
    .group-name-truncate {
        max-width: 50px;
    }
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.bg-white-sp {
    background-color: white;
    border: 1px solid #9a9a9a;
}
.legend-box.bg-yellow-sp {
    background-color: rgb(255, 239, 200);
    border: 1px solid rgb(204, 165, 68);
}

.legend-box.bg-yellow-sp:hover {
    background-color: rgb(255, 230, 168);
}

.legend-box.bg-blue-sp {
    background-color: rgb(178, 241, 255);
    border: 1px solid rgb(54, 184, 213);
}

.legend-box.bg-blue-sp:hover {
    background-color: rgb(150, 236, 255);
}

#searchOptionFilter .form-check-label {
    display: inline-block;
}

.ticker-textarea textarea {
    min-height: calc(1.5em * 3); /* 3 rows */
    max-height: calc(1.5em * 10); /* 10 rows */
    resize: vertical; /* only vertical resize */
    overflow-y: auto;
}

#tableContainer {
    overflow: auto;
}