.agency-dropdown {
    position: relative;
    width: 100%;
}

.agency-dropdown.is-enhanced select {
    display: none;
}

.agency-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--saps-dark, #1b3547);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.3s var(--ease-spring, cubic-bezier(0.175, 0.885, 0.32, 1.05));
}

.agency-dropdown-trigger:hover,
.agency-dropdown.is-open .agency-dropdown-trigger {
    border-color: rgba(12, 165, 230, 0.55);
    box-shadow: 0 0 0 3px rgba(12, 165, 230, 0.12);
}

.agency-dropdown-trigger:focus-visible {
    outline: none;
    border-color: var(--saps-light, #0ca5e6);
    box-shadow: 0 0 0 4px rgba(12, 165, 230, 0.2);
}

.agency-dropdown-trigger[aria-invalid="true"],
.agency-dropdown.has-error .agency-dropdown-trigger {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.16);
}

.agency-dropdown-trigger:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.agency-dropdown-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agency-dropdown-icon {
    flex: 0 0 auto;
    color: var(--saps-slate, #3b7396);
    font-size: 0.8em;
    transition: transform 0.3s var(--ease-smooth, cubic-bezier(0.16, 1, 0.3, 1));
}

.agency-dropdown.is-open .agency-dropdown-icon {
    transform: rotate(180deg);
}

.agency-dropdown-list {
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    z-index: 1000;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--saps-dark, #1b3547);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
    scrollbar-width: thin;
    scrollbar-color: #3b7396 rgba(27, 53, 71, 0.08);
    animation: agencyDropdownIn 0.18s var(--ease-smooth, cubic-bezier(0.16, 1, 0.3, 1));
}

.agency-dropdown-list[hidden] {
    display: none;
}

.agency-dropdown-list::-webkit-scrollbar {
    width: 10px;
}

.agency-dropdown-list::-webkit-scrollbar-track {
    margin: 8px 0;
    border-radius: 99px;
    background: rgba(27, 53, 71, 0.08);
}

.agency-dropdown-list::-webkit-scrollbar-thumb {
    border: 2px solid rgba(255, 255, 255, 0.65);
    border-radius: 99px;
    background: linear-gradient(180deg, #0ca5e6, #3b7396);
}

.agency-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #078bc4, #1b3547);
}

.agency-dropdown-option {
    width: 100%;
    display: block;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--saps-dark, #1b3547);
    font: inherit;
    font-size: 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.agency-dropdown-option:hover,
.agency-dropdown-option:focus-visible {
    outline: none;
    background: rgba(12, 165, 230, 0.12);
    color: var(--saps-dark, #1b3547);
}

.agency-dropdown-option[aria-selected="true"] {
    background: linear-gradient(135deg, #1b3547, #3b7396);
    color: #fff;
    font-weight: 700;
}

.agency-dropdown-option[aria-selected="true"]:hover,
.agency-dropdown-option[aria-selected="true"]:focus-visible {
    background: #0ca5e6;
    color: #fff;
}

@keyframes agencyDropdownIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .agency-dropdown *,
    .agency-dropdown-list {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
