/* CENTER CRM 0.12.13 — unified animated select system */
.center-select {
    --center-select-height: 45px;
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    isolation: isolate;
}

.center-select__native {
    position: absolute !important;
    z-index: -1 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 1px !important;
    min-width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    max-height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
}

.center-select__trigger {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 22px;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-width: 0;
    min-height: var(--center-select-height);
    padding: 0 12px 0 14px;
    border: 1px solid #383838;
    border-radius: 12px;
    outline: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0)),
        #181818;
    color: #e8e8e8;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025),
        0 0 0 0 rgba(246,197,67,0);
    font: inherit;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
    cursor: pointer;
    transition:
        border-color .18s ease,
        background .18s ease,
        box-shadow .18s ease,
        transform .18s ease,
        color .18s ease;
}

.center-select__trigger::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(105deg, transparent 28%, rgba(246,197,67,.045) 48%, transparent 68%);
    opacity: 0;
    transform: translateX(-14%);
    pointer-events: none;
    transition: opacity .2s ease, transform .32s ease;
}

.center-select__trigger:hover {
    border-color: #4a4432;
    background:
        linear-gradient(180deg, rgba(246,197,67,.035), rgba(255,255,255,0)),
        #1b1b1b;
    color: #f5f5f5;
}

.center-select__trigger:hover::before {
    opacity: 1;
    transform: translateX(10%);
}

.center-select__trigger:focus-visible,
.center-select.is-open .center-select__trigger {
    border-color: rgba(246,197,67,.68);
    background:
        linear-gradient(180deg, rgba(246,197,67,.055), rgba(246,197,67,.012)),
        #1b1b1b;
    color: #fff;
    box-shadow:
        0 0 0 3px rgba(246,197,67,.085),
        0 12px 30px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.035);
}

.center-select.is-open .center-select__trigger {
    transform: translateY(-1px);
}

.center-select__value {
    position: relative;
    z-index: 1;
    display: block;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.center-select__chevron {
    position: relative;
    z-index: 1;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #8e8e8e;
    transform: rotate(0deg);
    transition: color .18s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}

.center-select__chevron svg {
    display: block;
    width: 15px;
    height: 15px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.center-select__trigger:hover .center-select__chevron,
.center-select.is-open .center-select__chevron {
    color: #f1c84d;
}

.center-select.is-open .center-select__chevron {
    transform: rotate(180deg);
}

.center-select.is-disabled .center-select__trigger,
.center-select__trigger:disabled {
    border-color: #2b2b2b;
    background: #151515;
    color: #666;
    box-shadow: none;
    cursor: not-allowed;
    opacity: .72;
    transform: none;
}

.center-select.is-invalid .center-select__trigger {
    border-color: rgba(225,92,92,.72);
    box-shadow: 0 0 0 3px rgba(225,92,92,.08);
}

.center-select-menu {
    --center-select-menu-max-height: 340px;
    position: fixed;
    z-index: 12050;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    width: 240px;
    min-width: 160px;
    max-width: calc(100vw - 20px);
    max-height: var(--center-select-menu-max-height);
    padding: 6px;
    overflow: hidden;
    border: 1px solid #37332a;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(246,197,67,.035), transparent 30%),
        #181818;
    box-shadow:
        0 26px 70px rgba(0,0,0,.52),
        0 8px 20px rgba(0,0,0,.32),
        inset 0 1px 0 rgba(255,255,255,.035);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(.985);
    transform-origin: top center;
    pointer-events: none;
    transition:
        opacity .16s ease,
        transform .2s cubic-bezier(.2,.8,.2,1),
        visibility 0s linear .2s;
}

.center-select-menu.is-above {
    transform: translateY(7px) scale(.985);
    transform-origin: bottom center;
}

.center-select-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition-delay: 0s;
}

.center-select-menu__scroll {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #4b4534 transparent;
}

.center-select-menu__scroll::-webkit-scrollbar { width: 7px; }
.center-select-menu__scroll::-webkit-scrollbar-track { background: transparent; }
.center-select-menu__scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #4b4534;
    background-clip: padding-box;
}

.center-select-option {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0,1fr) 22px;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 39px;
    margin: 0;
    padding: 8px 9px 8px 11px;
    border: 0;
    border-radius: 9px;
    outline: 0;
    background: transparent;
    color: #b9b9b9;
    font: inherit;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
    transition:
        background .14s ease,
        color .14s ease,
        transform .14s ease,
        box-shadow .14s ease;
}

.center-select-option + .center-select-option { margin-top: 2px; }

.center-select-option:hover,
.center-select-option:focus-visible,
.center-select-option.is-active {
    background: rgba(255,255,255,.045);
    color: #f1f1f1;
}

.center-select-option:hover { transform: translateX(2px); }

.center-select-option.is-selected {
    background: linear-gradient(90deg, rgba(246,197,67,.13), rgba(246,197,67,.035));
    color: #f6d36a;
    box-shadow: inset 0 0 0 1px rgba(246,197,67,.11);
}

.center-select-option:disabled,
.center-select-option[aria-disabled="true"] {
    color: #555;
    cursor: not-allowed;
    opacity: .7;
    transform: none;
}

.center-select-option__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.center-select-option__check {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 7px;
    color: transparent;
    transform: scale(.82);
    transition: color .14s ease, background .14s ease, transform .18s cubic-bezier(.2,.8,.2,1);
}

.center-select-option__check svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.center-select-option.is-selected .center-select-option__check {
    background: rgba(246,197,67,.12);
    color: #f6c543;
    transform: scale(1);
}

.center-select-menu__empty {
    padding: 14px 12px;
    color: #686868;
    font-size: .75rem;
    font-weight: 700;
    text-align: center;
}

/* Compatibility with compact controls used throughout CENTER CRM. */
.avito-global-search-scope-field .center-select,
.avito-filter-grid .center-select,
.avito-queue-filters .center-select,
.notification-filters .center-select,
.client-db-filter-grid .center-select,
.delivery-filter-field .center-select,
.reports-filter .center-select,
.analytics-control-fields .center-select,
.avito-inquiries-select-wrap .center-select,
.avito-blacklist-select-wrap .center-select,
.tg-editor-card .field .center-select,
.tg-candidate-form .field .center-select,
.avito-quick-library-filter .center-select {
    width: 100%;
    min-width: 0;
}

.avito-quick-library-filter .center-select {
    --center-select-height: 50px !important;
}

/* Native browser select arrows must never leak through after enhancement. */
.center-select .center-select__native::-ms-expand { display: none; }

@media (max-width: 720px) {
    .center-select__trigger { padding-left: 12px; border-radius: 11px; }
    .center-select-menu { border-radius: 13px; }
    .center-select-option { min-height: 42px; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
    .center-select__trigger,
    .center-select__trigger::before,
    .center-select__chevron,
    .center-select-menu,
    .center-select-option,
    .center-select-option__check {
        transition: none !important;
        animation: none !important;
    }
}

/* CENTER CRM 0.12.16 — select compatibility hardening.
   The native element remains the form source of truth but must never paint its
   browser arrow behind the animated trigger. */
.center-select > select.center-select__native {
    -webkit-appearance: none !important;
    appearance: none !important;
    background: none !important;
    background-image: none !important;
    color: transparent !important;
    text-shadow: none !important;
}
.center-select > select.center-select__native::-ms-expand { display: none !important; }

/* Legacy wrappers are allowed to style labels, but once their select has been
   enhanced there must be only one visible chevron: the CENTER select chevron. */
.avito-inquiries-select-wrap:has(> .center-select)::after,
.avito-blacklist-select-wrap:has(> .center-select)::after {
    content: none !important;
    display: none !important;
}
