/* ===============================
   SEARCHABLE SELECT
   =============================== */
.ss-wrapper {
    position: relative;
    width: 100%;
}

/* Display (der sichtbare "Button") */
.ss-display {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 2.2rem 0.5rem 0.8rem;
    background: #181818;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    position: relative;
    user-select: none;
    box-sizing: border-box;
}

.ss-display:hover {
    border-color: rgba(212, 175, 55, 0.5);
}

.ss-display.ss-active {
    border-color: var(--color-accent-solid);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.ss-display:focus {
    outline: none;
    border-color: var(--color-accent-solid);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Pfeil */
.ss-arrow {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #999;
    transition: transform 0.2s;
    pointer-events: none;
}

.ss-active .ss-arrow {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: var(--color-accent-solid);
}

/* Texte im Display */
.ss-display-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-display-sub {
    font-size: 0.78rem;
    color: #888;
    white-space: nowrap;
}

.ss-placeholder-text {
    color: #666;
    flex: 1;
}

/* Dropdown */
.ss-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1100;
    background: var(--color-surface, #1a1a1a);
    border: 1px solid var(--color-accent-solid);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

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

/* Suchfeld im Dropdown */
.ss-search {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: none;
    border-bottom: 1px solid var(--color-border);
    background: #222;
    color: var(--color-text);
    font-size: 0.9rem;
    font-family: var(--font-primary);
    outline: none;
    box-sizing: border-box;
    border-radius: 0;
}

.ss-search::placeholder {
    color: #666;
}

.ss-search:focus {
    box-shadow: none;
    border-color: var(--color-border);
}

/* Options-Liste */
.ss-list {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent, #d4af37) #111;
}

.ss-list::-webkit-scrollbar {
    width: 6px;
}

.ss-list::-webkit-scrollbar-track {
    background: #111;
}

.ss-list::-webkit-scrollbar-thumb {
    background: var(--color-accent-solid, #d4af37);
    border-radius: 3px;
}

/* Einzelne Option */
.ss-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.ss-option:last-child {
    border-bottom: none;
}

.ss-option:hover {
    background: rgba(212, 175, 55, 0.12);
}

.ss-option.ss-selected {
    background: rgba(212, 175, 55, 0.18);
    color: var(--color-accent-solid);
    font-weight: 600;
}

.ss-option.ss-placeholder {
    color: #666;
    font-style: italic;
}

.ss-option-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-option-sub {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
    flex-shrink: 0;
}

.ss-selected .ss-option-sub {
    color: rgba(212, 175, 55, 0.7);
}

/* Keine Ergebnisse */
.ss-empty {
    padding: 0.8rem;
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 0.85rem;
}

/* ===============================
   RESPONSIVE
   =============================== */
@media (max-width: 767px) {
    .ss-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 12px 12px 0 0;
        max-height: 60vh;
    }

    .ss-list {
        max-height: calc(60vh - 50px);
    }

    .ss-search {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .ss-option {
        padding: 0.7rem 1rem;
    }
}
