/* Graph Configuration Page Styles */

/* Prevent columns from stretching to match tallest column */
.row > [class*='col-'] {
    align-self: flex-start;
}

/* Main container styles */
.config-box {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
}

.config-header {
    background-color: #3c8dbc;
    color: white;
    padding: 15px 20px;
    border-radius: 5px 5px 0 0;
    margin: -20px -20px 20px -20px;
}

/* Alert styles */
.alert-info-custom {
    background-color: #3c8dbc !important;
    color: #fff !important;
    border-color: #3c8dbc !important;
}

.alert-success-custom {
    background-color: #00a65a !important;
    color: #fff !important;
    border-color: #00a65a !important;
}

/* Form styles */
.form-label {
    font-weight: 600;
    margin-bottom: 5px;
}

.label-with-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.label-with-tooltip .tooltip-icon {
    font-size: 0.8rem;
    color: #5ba4cf;
    margin-left: 4px;
    vertical-align: middle;
}

.label-with-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: 280px;
    background-color: #2c3e50;
    color: #ecf0f1;
    text-align: left;
    border-radius: 6px;
    padding: 10px 12px;
    position: absolute;
    z-index: 1000;
    bottom: calc(100% + 8px);
    left: 0;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
    pointer-events: none;
}

.label-with-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: #2c3e50 transparent transparent transparent;
}

.label-with-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}


.mb-3 {
    margin-bottom: 1rem !important;
}

/* Predication type multi-select sizing */
#PREDICATION_TYPE {
    height: 200px;
    min-height: 200px;
}

/* Button styles */
.btn-create-graph {
    background-color: #3c8dbc;
    color: white;
    border-color: #367fa9;
    font-size: 1.1rem;
    padding: 12px 24px;
}

.btn-create-graph:hover {
    background-color: #367fa9;
    color: white;
}

.btn-clear {
    font-size: 0.875rem;
    padding: 4px 12px;
}

/* Progress section */
#graph_progress_section {
    display: none;
    margin-top: 20px;
}

#graph_progress_section h4 {
    margin-bottom: 15px;
}

.progress-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

.progress {
    height: 25px;
}

.progress-bar {
    background-color: #007bff;
}

#graph_progress_status {
    font-size: 14px;
    color: #6c757d;
    margin-top: 10px;
}

/* CUI Search Results */
.cui-search-results {
    max-height: 350px;
    overflow-y: auto;
    border: 1px solid #c5ccd3;
    border-radius: 6px;
    margin-top: 6px;
    display: none;
    background-color: #fff;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

/* Custom scrollbar for results container */
.cui-search-results::-webkit-scrollbar {
    width: 8px;
}
.cui-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 6px 6px 0;
}
.cui-search-results::-webkit-scrollbar-thumb {
    background: #a0aec0;
    border-radius: 4px;
}
.cui-search-results::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

.cui-no-results {
    padding: 12px 14px;
    color: #6c757d;
    text-align: center;
    font-style: italic;
}

/* CUI Results Table */
.cui-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    line-height: 1.4;
}

.cui-results-table thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

.cui-results-table thead tr {
    background-color: #2c3e50;
}

.cui-results-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #fff;
    border-bottom: 2px solid #1a252f;
    white-space: nowrap;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.cui-results-table td {
    padding: 7px 10px;
    border-bottom: 1px solid #e8ecf0;
    vertical-align: top;
}

.cui-col-num {
    width: 28px;
    text-align: center;
    color: #a0aec0;
    font-size: 0.75rem;
}

.cui-col-sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
}

.cui-col-sortable:hover {
    background-color: #3d5269;
}

.sort-arrow {
    color: rgba(255, 255, 255, 0.55);
    margin-left: 3px;
    font-size: 0.7rem;
}

.cui-col-cui {
    width: 82px;
    white-space: nowrap;
}

.cui-code {
    color: #2980b9;
    font-weight: 700;
    cursor: pointer;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.8rem;
    transition: color 0.15s ease;
}

.cui-code:hover {
    color: #1a5276;
    text-decoration: underline;
}

.cui-col-name {
    min-width: 110px;
    font-weight: 500;
    color: #2d3748;
}

.cui-col-def {
    min-width: 90px;
    color: #636e78;
    font-size: 0.78rem;
}

.cui-col-type {
    min-width: 60px;
    white-space: nowrap;
    color: #6c5ce7;
    font-weight: 600;
    font-size: 0.76rem;
}

.cui-result-row {
    cursor: pointer;
    transition: background-color 0.12s ease;
}

/* Zebra striping */
.cui-row-stripe {
    background-color: #f7f9fb;
}

.cui-result-row:hover {
    background-color: #dbeafe;
}

.cui-row-selected {
    background-color: #d4edda !important;
    transition: background-color 0.3s;
}

/* Predication Type Multi-Select */
#PREDICATION_TYPE {
    height: auto;
    min-height: 120px;
}

#PREDICATION_TYPE option:checked {
    background-color: #3c8dbc;
    color: white;
}

/* Squelch Thresholds Section */
.squelch-thresholds-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.squelch-thresholds-section h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

/* Disabled threshold fields */
.threshold-field:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .config-box {
        padding: 15px;
    }

    .config-header {
        margin: -15px -15px 15px -15px;
        padding: 12px 15px;
    }
}

/* Squelch thresholds section */
.squelch-thresholds-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.squelch-thresholds-section h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #333;
}

/* Reduce spacing in second row */
.row.mt-3 {
    margin-top: 0.75rem !important;
}

/* Compact form groups */
.col-md-4 .mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Reduce spacing in first row columns */
.row:first-of-type .col-md-4 {
    padding-bottom: 0;
}

/* Tighter spacing for form elements */
.form-select,
.form-control {
    margin-bottom: 0;
}

/* Reduce padding in config box */
.config-box {
    padding: 15px 20px;
}

/* Prevent columns from stretching to match height */
.row {
    align-items: flex-start !important;
}

.col-md-4 {
    display: flex;
    flex-direction: column;
}

/* Remove extra spacing after consolidated name fields */
.col-md-4 > div:last-child {
    margin-bottom: 0;
}

