.ecomAttributeSelector {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ecomAttributeSelectorControl {
    position: relative;
}

.ecomAttributeSelectorLabel {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--ecomColorTextStrong);
    letter-spacing: -0.28px;
}

@media (min-width: 1024px) {
    .ecomAttributeSelectorLabel {
        font-size: 16px;
        letter-spacing: -0.32px;
    }
}

/* Trigger ------------------------------------------------------------- */

.ecomAttributeSelectorTrigger {
    display: flex !important;
    width: 100% !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 12px;
    padding: 16px !important;
    margin: 0 !important;
    border: 1px solid var(--ecomColorTextStrong) !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: var(--ecomColorTextStrong) !important;
    font-family: 'Poppins', sans-serif !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    line-height: normal !important;
    transition:
        border-color 150ms ease,
        background-color 150ms ease,
        transform 120ms ease-out;
}

@media (hover: hover) and (pointer: fine) {
    .ecomAttributeSelectorTrigger:hover {
        background-color: rgba(7, 59, 74, 0.03) !important;
    }
}

.ecomAttributeSelectorTrigger:active {
    transform: scale(0.99);
}

.ecomAttributeSelectorTrigger:focus-visible {
    outline: 2px solid var(--ecomColorAccent) !important;
    outline-offset: 2px;
}

.ecomAttributeSelectorTriggerMain {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

@media (min-width: 1024px) {
    .ecomAttributeSelectorTriggerMain {
        gap: 6px;
    }
}

.ecomAttributeSelectorTriggerLabel {
    font-size: 14px;
    font-weight: 600;
    color: var(--ecomColorTextStrong);
}

@media (min-width: 1024px) {
    .ecomAttributeSelectorTriggerLabel {
        font-size: 18px;
    }
}

.ecomAttributeSelectorTriggerRight {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.ecomAttributeSelectorChevron {
    display: block;
    flex-shrink: 0;
    width: 14px;
    height: 7px;
    transition: transform 180ms var(--ecomEaseOut);
}

.ecomAttributeSelector[data-state="open"] .ecomAttributeSelectorChevron {
    transform: rotate(180deg);
}

/* Dropdown ------------------------------------------------------------ */

.ecomAttributeSelectorDropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 100;
    padding: 6px;
    border-radius: 8px;
    background-color: var(--ecomColorSurface);
    box-shadow: 0 12px 32px rgba(7, 59, 74, 0.18);
    transform-origin: top center;
    transform: scale(0.98) translateY(-6px);
    opacity: 0;
    pointer-events: none;
    transition:
        transform 180ms var(--ecomEaseOut),
        opacity 160ms var(--ecomEaseOut);
}

.ecomAttributeSelector[data-state="open"] .ecomAttributeSelectorDropdown {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.ecomAttributeSelector[data-flip="up"] .ecomAttributeSelectorDropdown {
    top: auto;
    bottom: calc(100% + 6px);
    transform-origin: bottom center;
    transform: scale(0.98) translateY(6px);
}

.ecomAttributeSelector[data-flip="up"][data-state="open"] .ecomAttributeSelectorDropdown {
    transform: scale(1) translateY(0);
}

/* List ---------------------------------------------------------------- */

.ecomAttributeSelectorList {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 59, 74, 0.25) transparent;
}

.ecomAttributeSelectorList li {
    margin: 0 0 4px !important;
    padding: 0;
    list-style: none;
}

.ecomAttributeSelectorList li:last-child {
    margin-bottom: 0 !important;
}

.ecomAttributeSelectorList::-webkit-scrollbar {
    width: 6px;
}

.ecomAttributeSelectorList::-webkit-scrollbar-thumb {
    background-color: rgba(7, 59, 74, 0.25);
    border-radius: 3px;
}

/* Options ------------------------------------------------------------- */

.ecomAttributeSelectorOption {
    display: flex !important;
    width: 100% !important;
    align-items: center;
    justify-content: space-between !important;
    gap: 8px;
    padding: 8px 10px !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--ecomColorTextStrong) !important;
    font-family: 'Poppins', sans-serif !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    transition: background-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
    .ecomAttributeSelectorOption:not([disabled]):hover {
        background-color: rgba(0, 144, 189, 0.08) !important;
    }
}

.ecomAttributeSelectorOption:focus-visible {
    outline: 2px solid var(--ecomColorAccent) !important;
    outline-offset: -2px;
}

.ecomAttributeSelectorOption[aria-selected="true"] {
    background-color: rgba(0, 144, 189, 0.1) !important;
}

.ecomAttributeSelectorOption[disabled] {
    opacity: 0.4;
    cursor: not-allowed;
}

.ecomAttributeSelectorOptionMain {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ecomAttributeSelectorOptionLabel {
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.ecomAttributeSelectorOptionStockNote {
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

@media (min-width: 1024px) {
    .ecomAttributeSelectorOptionStockNote {
        font-size: 15px;
        line-height: 20px;
    }
}

/* Stagger entry — options slide & fade in when dropdown opens --------- */

.ecomAttributeSelectorOption {
    opacity: 0;
    transform: translateY(-4px);
    transition:
        background-color 140ms ease 0ms,
        opacity 200ms var(--ecomEaseOut) 0ms,
        transform 220ms var(--ecomEaseOut) 0ms;
}

.ecomAttributeSelector[data-state="open"] .ecomAttributeSelectorOption {
    opacity: 1;
    transform: translateY(0);
    transition:
        background-color 140ms ease 0ms,
        opacity 200ms var(--ecomEaseOut) calc(var(--ecomAttributeSelectorIndex, 0) * 25ms),
        transform 220ms var(--ecomEaseOut) calc(var(--ecomAttributeSelectorIndex, 0) * 25ms);
}

@media (prefers-reduced-motion: reduce) {
    .ecomAttributeSelectorChevron,
    .ecomAttributeSelectorDropdown,
    .ecomAttributeSelectorTrigger,
    .ecomAttributeSelectorOption {
        transition: none !important;
        transition-delay: 0ms !important;
    }
    .ecomAttributeSelectorOption {
        opacity: 1;
        transform: none;
    }
}
