/* Global Searchable Dropdown (Frontend & CMS) */
.ss-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 140px;
    font-family: inherit;
    box-sizing: border-box;
}

.ss-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    pointer-events: none !important;
}

.ss-trigger {
    width: 100%;
    min-height: 42px;
    padding: 0.5rem 2.25rem 0.5rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(17, 24, 39, 0.18);
    background-color: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    box-sizing: border-box;
}

.ss-trigger-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    width: 100%;
}

.ss-trigger-arrow {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    pointer-events: none;
    opacity: 0.72;
    transition: transform 180ms ease;
}

.ss-wrap.is-open .ss-trigger-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.ss-trigger:hover {
    border-color: rgba(29, 78, 216, 0.45);
}

.ss-trigger:focus,
.ss-wrap.is-open .ss-trigger {
    outline: none;
    border-color: #1D4ED8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.14);
}

/* Brand-green toolbar variant (/ventures) */
.ventures-toolbar .ss-wrap {
    width: auto;
    min-width: 175px;
}

.ventures-toolbar .ss-trigger {
    height: 42px;
    min-height: 42px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    padding: 0 2.35rem 0 1rem;
}

.ventures-toolbar .ss-trigger:hover {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.48);
}

.ventures-toolbar .ss-trigger:focus,
.ventures-toolbar .ss-wrap.is-open .ss-trigger {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.ventures-toolbar .ss-trigger-arrow {
    opacity: 0.92;
}

/* Dropdown Popover */
.ss-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    min-width: 210px;
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.16), 0 2px 6px rgba(0, 0, 0, 0.06);
    z-index: 2500;
    display: none;
    overflow: hidden;
    box-sizing: border-box;
}

.ss-wrap.is-open {
    z-index: 2500;
}

.ss-wrap.is-open .ss-menu {
    display: block;
}

.ss-wrap.is-dropup .ss-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.ss-search-box {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    background: #f8fafa;
}

.ss-search-input {
    width: 100%;
    height: 36px;
    padding: 0 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(17, 24, 39, 0.16);
    background: #ffffff;
    color: #111827;
    font-family: inherit;
    font-size: 0.86rem;
    box-sizing: border-box;
}

.ss-search-input:focus {
    outline: none;
    border-color: #1D4ED8;
    box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}

.ss-options {
    list-style: none;
    margin: 0;
    padding: 0.35rem;
    max-height: 240px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(29, 78, 216, 0.35) transparent;
}

.ss-option {
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #111827;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: background-color 120ms ease, color 120ms ease;
    word-break: break-word;
}

.ss-option:hover,
.ss-option.is-highlighted {
    background: rgba(29, 78, 216, 0.08);
    color: #1D4ED8;
}

.ss-option.is-selected {
    background: #1D4ED8;
    color: #ffffff;
    font-weight: 600;
}

.ss-option.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.ss-empty {
    padding: 0.85rem 0.75rem;
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 640px) {
    .ventures-toolbar .ss-wrap {
        width: 100%;
    }
    .ss-menu {
        min-width: 100%;
    }
}
