.cg-select {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.cg-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
}

.cg-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    padding: 9px 15px;
    border: 1px solid rgba(130, 169, 224, .18);
    border-radius: 15px;
    outline: 0;
    background: linear-gradient(145deg, rgba(15, 30, 51, .9), rgba(6, 14, 27, .94));
    color: #eef5ff;
    box-shadow: inset 0 1px rgba(255, 255, 255, .035), 0 8px 22px rgba(0, 0, 0, .1);
    cursor: pointer;
    text-align: right;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cg-select-trigger:hover:not(:disabled) {
    border-color: rgba(105, 165, 246, .36);
    background: linear-gradient(145deg, rgba(20, 40, 67, .94), rgba(7, 17, 32, .98));
}

.cg-select-trigger:focus-visible,
.cg-select.is-open .cg-select-trigger {
    border-color: rgba(91, 151, 245, .72);
    box-shadow: 0 0 0 4px rgba(71, 132, 238, .11), 0 15px 34px rgba(10, 34, 76, .2), inset 0 1px rgba(255, 255, 255, .05);
}

.cg-select.is-invalid .cg-select-trigger {
    border-color: rgba(255, 101, 128, .68);
    box-shadow: 0 0 0 4px rgba(255, 83, 112, .1);
}

.cg-select-trigger:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.cg-select-trigger-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cg-select-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border: 2px solid rgba(129, 166, 218, .5);
    border-radius: 999px;
    background: rgba(79, 131, 213, .1);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.cg-select.has-value .cg-select-dot {
    border-color: #83b7ff;
    background: #5a94ef;
    box-shadow: 0 0 0 4px rgba(80, 139, 235, .11), 0 0 16px rgba(83, 149, 246, .4);
    transform: scale(.86);
}

.cg-select-value {
    min-width: 0;
    overflow: hidden;
    color: #9eb0c8;
    font-size: .9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cg-select.has-value .cg-select-value {
    color: #f4f8ff;
}

.cg-select-chevron {
    width: 9px;
    height: 9px;
    margin: -4px 2px 0;
    flex: 0 0 auto;
    border-left: 2px solid #8298b8;
    border-bottom: 2px solid #8298b8;
    transform: rotate(-45deg);
    transition: transform .25s cubic-bezier(.2, .8, .24, 1), border-color .2s ease;
}

.cg-select.is-open .cg-select-chevron {
    border-color: #b9d2f4;
    transform: translateY(4px) rotate(135deg);
}

.cg-select-menu {
    position: fixed;
    z-index: 100000;
    display: grid;
    gap: 6px;
    padding: 8px;
    overflow: hidden auto;
    border: 1px solid rgba(133, 178, 239, .22);
    border-radius: 17px;
    background: radial-gradient(circle at 86% 0, rgba(76, 135, 231, .16), transparent 48%), rgba(7, 16, 30, .985);
    color: #eaf3ff;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .055);
    backdrop-filter: blur(20px);
    direction: rtl;
    transform-origin: top center;
}

.cg-select-menu.is-open {
    animation: cgSelectMenuIn .2s cubic-bezier(.18, .82, .25, 1) both;
}

.cg-select-menu.opens-up {
    transform-origin: bottom center;
}

.cg-select-search {
    position: sticky;
    top: -8px;
    z-index: 2;
    padding: 2px 0 7px;
    background: linear-gradient(180deg, #0a192e 82%, transparent);
}

.cg-select-search input {
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid rgba(132, 174, 230, .17);
    border-radius: 12px;
    outline: 0;
    background: rgba(255, 255, 255, .05);
    color: #f5f9ff;
}

.cg-select-search input:focus {
    border-color: rgba(101, 162, 246, .55);
    box-shadow: 0 0 0 3px rgba(75, 135, 233, .1);
}

.cg-select-options {
    display: grid;
    gap: 4px;
}

.cg-select-group {
    padding: 8px 10px 4px;
    color: #748aa9;
    font-size: .72rem;
    font-weight: 900;
}

.cg-select-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 43px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 12px;
    outline: 0;
    background: transparent;
    color: #adbed4;
    cursor: pointer;
    text-align: right;
    transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.cg-select-option:hover:not(:disabled),
.cg-select-option:focus-visible {
    border-color: rgba(111, 166, 241, .2);
    background: rgba(78, 132, 219, .11);
    color: #f4f8ff;
    transform: translateX(-2px);
}

.cg-select-option[aria-selected="true"] {
    border-color: rgba(103, 157, 244, .28);
    background: linear-gradient(135deg, rgba(73, 130, 228, .22), rgba(60, 98, 165, .08));
    color: #fff;
}

.cg-select-option:disabled {
    opacity: .42;
    cursor: not-allowed;
}

.cg-select-option-label {
    min-width: 0;
    overflow: hidden;
    font-size: .86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cg-select-option-check {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border: 1px solid rgba(130, 166, 218, .15);
    border-radius: 7px;
    background: rgba(255, 255, 255, .025);
    color: transparent;
    font-size: .78rem;
    font-weight: 950;
}

.cg-select-option[aria-selected="true"] .cg-select-option-check {
    border-color: rgba(130, 179, 255, .48);
    background: #548de7;
    color: #fff;
    box-shadow: 0 6px 17px rgba(53, 108, 205, .3);
}

.owner-editor-toolbar .cg-select {
    width: auto;
    min-width: 140px;
    flex: 1 1 140px;
}

.owner-editor-toolbar .cg-select-trigger {
    min-height: 38px;
    height: 38px;
    padding: 5px 10px;
    border-radius: 12px;
}

.owner-editor-toolbar .cg-select-value {
    font-size: .8rem;
}

@keyframes cgSelectMenuIn {
    from { opacity: 0; transform: translateY(-6px) scale(.975); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 680px) {
    .cg-select-trigger {
        min-height: 52px;
        border-radius: 15px;
    }

    .cg-select-menu {
        border-radius: 16px;
    }

    .owner-editor-toolbar .cg-select {
        width: 100%;
        min-width: 0;
        flex-basis: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cg-select-menu.is-open,
    .cg-select-option {
        animation: none;
    }
}
