/* Searchable select controls adapted from the SedonaFeedback report filters. */
.sedona-select {
    position: relative;
    z-index: 4;
    width: 100%;
}

.sedona-select.is-open {
    z-index: 1060;
}

.sedona-select-open-container {
    overflow: visible !important;
    transform: none !important;
}

.sedona-native-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sedona-select-trigger {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.62rem 0.7rem;
    color: #314d68;
    border: 1px solid #dce5ee;
    border-radius: 13px;
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
    box-shadow: 0 1px 2px rgba(30, 66, 107, 0.035);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sedona-select-trigger:hover:not(:disabled) {
    border-color: #c9d6e3;
    box-shadow: 0 5px 16px rgba(30, 66, 107, 0.075);
    transform: translateY(-1px);
}

.sedona-select-trigger:focus-visible,
.sedona-select.is-open .sedona-select-trigger {
    outline: 0;
    border-color: rgba(238, 162, 45, 0.82);
    box-shadow: 0 0 0 4px rgba(238, 162, 45, 0.13), 0 7px 20px rgba(30, 66, 107, 0.08);
}

.sedona-select.is-invalid .sedona-select-trigger {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-subtle);
}

.sedona-select-trigger:disabled {
    color: #91a0ae;
    border-color: #e4e9ee;
    background: #f5f7f9;
    box-shadow: none;
    cursor: not-allowed;
}

.sedona-select-leading,
.sedona-select-option-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    color: #6c8195;
    background: #edf2f6;
}

.sedona-select-leading {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: #a96b0e;
    background: rgba(238, 162, 45, 0.13);
    font-size: 0.95rem;
}

.sedona-select.is-disabled .sedona-select-leading {
    color: #91a0ae;
    background: #e9edf1;
}

.sedona-select-copy,
.sedona-select-option-copy {
    min-width: 0;
}

.sedona-select-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.sedona-select-value {
    overflow: hidden;
    font-size: 0.91rem;
    font-weight: 750;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sedona-select-hint {
    overflow: hidden;
    margin-top: 0.12rem;
    color: #97a3b0;
    font-size: 0.68rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sedona-select-chevron {
    display: grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #6f8295;
    border-radius: 9px;
    background: #f1f5f8;
    font-size: 0.75rem;
    transition: color 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.sedona-select.is-open .sedona-select-chevron {
    color: #a96b0e;
    background: rgba(238, 162, 45, 0.14);
    transform: rotate(180deg);
}

.sedona-select-panel {
    position: absolute;
    z-index: 1061;
    top: calc(100% + 0.55rem);
    right: 0;
    left: 0;
    min-width: min(100%, 340px);
    overflow: hidden;
    padding: 0.55rem;
    border: 1px solid rgba(30, 66, 107, 0.11);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 20px 48px rgba(30, 66, 107, 0.17), 0 4px 12px rgba(30, 66, 107, 0.07);
    animation: sedonaSelectIn 0.16s ease-out;
}

.sedona-select.opens-up .sedona-select-panel {
    top: auto;
    bottom: calc(100% + 0.55rem);
}

.sedona-select-panel[hidden] {
    display: none;
}

@keyframes sedonaSelectIn {
    from { opacity: 0; transform: translateY(-5px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sedona-select-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0.45rem;
}

.sedona-select-search-wrap > i {
    position: absolute;
    left: 0.85rem;
    color: #8b9aaa;
    pointer-events: none;
}

.sedona-select-search {
    width: 100%;
    height: 42px;
    padding: 0.5rem 3rem 0.5rem 2.45rem;
    color: #314d68;
    border: 1px solid #e0e7ee;
    border-radius: 11px;
    outline: none;
    background: #f8fafc;
    font-size: 0.82rem;
}

.sedona-select-search:focus {
    border-color: rgba(238, 162, 45, 0.7);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(238, 162, 45, 0.1);
}

.sedona-select-count {
    position: absolute;
    right: 0.75rem;
    min-width: 24px;
    padding: 0.12rem 0.4rem;
    color: #65798d;
    border-radius: 999px;
    background: #eaf0f5;
    font-size: 0.64rem;
    font-weight: 800;
    text-align: center;
}

.sedona-select-options {
    max-height: 285px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.sedona-select-option {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 0.7rem;
    padding: 0.62rem 0.65rem;
    color: #405970;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.sedona-select-option:hover:not(:disabled),
.sedona-select-option:focus-visible {
    outline: none;
    color: #1e426b;
    background: #f2f6fa;
}

.sedona-select-option.is-selected {
    color: #1e426b;
    background: rgba(238, 162, 45, 0.11);
}

.sedona-select-option:disabled {
    color: #9ba7b2;
    cursor: not-allowed;
    opacity: 0.72;
}

.sedona-select-option-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.sedona-select-option.is-selected .sedona-select-option-icon {
    color: #aa6c0e;
    background: rgba(238, 162, 45, 0.16);
}

.sedona-select-option-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.sedona-select-option-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.sedona-select-option-meta {
    margin-top: 0.12rem;
    color: #96a3af;
    font-size: 0.65rem;
}

.sedona-select-check {
    display: grid;
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    background: var(--sedona-orange);
    font-size: 0.75rem;
}

.sedona-select-check[hidden] {
    display: none;
}

.sedona-select-empty {
    padding: 1.5rem 1rem;
    color: #8796a6;
    text-align: center;
}

.sedona-select-empty i,
.sedona-select-empty span {
    display: block;
}

.sedona-select-empty i {
    margin-bottom: 0.35rem;
    font-size: 1.2rem;
}

.sedona-select-empty span {
    font-size: 0.78rem;
    font-weight: 650;
}

.sedona-select-options::-webkit-scrollbar {
    width: 6px;
}

.sedona-select-options::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c6d0da;
}

/* The client picker is a hand-built datalist; give its popup the same visual language. */
.form-group:has(> datalist[role="listbox"]) {
    position: relative;
}

datalist[role="listbox"] {
    z-index: 1061;
    max-height: 285px;
    margin-top: 0.55rem;
    padding: 0.55rem;
    overflow-y: auto;
    border: 1px solid rgba(30, 66, 107, 0.11);
    border-radius: 15px !important;
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 20px 48px rgba(30, 66, 107, 0.17), 0 4px 12px rgba(30, 66, 107, 0.07);
}

datalist[role="listbox"] option {
    margin: 0;
    padding: 0.72rem 0.75rem;
    color: #405970;
    border-radius: 10px;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    transition: color 0.15s ease, background-color 0.15s ease;
}

datalist[role="listbox"] option:hover,
datalist[role="listbox"] option.active {
    color: #1e426b;
    background: rgba(238, 162, 45, 0.11);
}

@media (max-width: 767.98px) {
    .sedona-select-panel {
        position: fixed;
        z-index: 1061;
        top: auto !important;
        right: 0.75rem;
        bottom: 0.75rem !important;
        left: 0.75rem;
        max-height: min(70vh, 520px);
        border-radius: 18px;
    }

    .sedona-select-options {
        max-height: calc(min(70vh, 520px) - 64px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .sedona-select-panel {
        animation: none;
    }

    .sedona-select-trigger,
    .sedona-select-chevron,
    .sedona-select-option {
        transition: none;
    }
}
