/* ============================================
 * SearchSelect - Composant select avec recherche
 * Classes: jd-ss-*
 * Usage: SearchSelect::render() dans views/components/SearchSelect.php
 * ============================================ */

.jd-searchselect {
    position: relative;
}

.jd-ss-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    color: #212529;
    cursor: pointer;
    transition: border-color 0.2s;
    user-select: none;
    gap: 8px;
}

.jd-ss-trigger:hover,
.jd-ss-trigger:focus {
    border-color: #003D7A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
}

.jd-searchselect.open .jd-ss-trigger {
    border-color: #003D7A;
    box-shadow: 0 0 0 3px rgba(0, 61, 122, 0.1);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.jd-ss-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    color: #6c757d;
}

.jd-ss-label-active {
    color: #212529;
    font-weight: 500;
}

.jd-ss-arrow {
    flex-shrink: 0;
    color: #6c757d;
    transition: transform 0.2s;
}

.jd-searchselect.open .jd-ss-arrow {
    transform: rotate(180deg);
}

.jd-ss-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: white;
    border: 1px solid #003D7A;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.jd-searchselect.open .jd-ss-dropdown {
    display: block;
}

.jd-ss-search {
    width: 100%;
    padding: 10px 12px;
    font-size: 13px;
    border: none;
    border-bottom: 1px solid #e9ecef;
    outline: none;
    box-sizing: border-box;
}

.jd-ss-search::placeholder {
    color: #adb5bd;
}

.jd-ss-options {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.jd-ss-group-label {
    padding: 6px 12px 4px;
    font-size: 10px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    pointer-events: none;
}

.jd-ss-option {
    padding: 7px 12px;
    font-size: 12px;
    color: #212529;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jd-ss-option:hover,
.jd-ss-option.highlighted {
    background: #e7f5ff;
}

.jd-ss-option.selected {
    background: #e7f5ff;
    font-weight: 600;
    color: #003D7A;
}

.jd-ss-option-default {
    font-style: italic;
    color: #6c757d;
}

.jd-ss-code {
    font-weight: 600;
    color: #003D7A;
    font-size: 11px;
}

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