.species-field {
    position: relative;
}

.species-search-wrap {
    position: relative;
}

.species-search-wrap input[role="combobox"] {
    padding-right: 42px;
}

.species-search-indicator {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #98a2b3;
    font-size: 13px;
    font-weight: 800;
    pointer-events: none;
}

.species-suggestions {
    position: absolute;
    z-index: 50;
    left: 0;
    right: 0;
    top: calc(100% + 7px);
    display: none;
    max-height: 310px;
    overflow-y: auto;
    padding: 7px;
    border: 1px solid #dfe4ec;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 24, 40, .14);
}

.species-suggestions[data-open="true"] {
    display: grid;
    gap: 3px;
}

.species-option {
    appearance: none;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    padding: 10px;
    text-align: left;
    cursor: pointer;
}

.species-option:hover,
.species-option:focus-visible {
    background: #f3f6ff;
    outline: none;
}

.species-option strong {
    display: block;
    color: #101828;
    font-size: 14px;
}

.species-option small {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 11px;
}

.species-type-list {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.species-type {
    border: 1px solid #e4e7ec;
    border-radius: 999px;
    padding: 3px 6px;
    color: #667085;
    background: #f9fafb;
    font-size: 10px;
    font-weight: 800;
    text-transform: capitalize;
}

.species-help {
    min-height: 18px;
    margin-top: 6px;
    color: #7b8494;
    font-size: 12px;
    line-height: 1.4;
}

.species-help[data-state="valid"] {
    color: #0b8f70;
}

.species-help[data-state="invalid"] {
    color: #b54708;
}

.slot-validation {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    color: #0b8f70;
    font-size: 11px;
    font-weight: 800;
}

.slot-validation[data-valid="false"] {
    color: #b54708;
}

@media (max-width: 470px) {
    .species-suggestions {
        max-height: 270px;
    }

    .species-option {
        padding: 12px 10px;
    }
}

/* M1.2 mobile editor workflow repair */
.editor-slot-nav {
    display: none;
}

@media (max-width: 760px) {
    .builder-layout {
        display: flex;
        flex-direction: column;
    }

    .builder-editor {
        order: 1;
        width: 100%;
        box-sizing: border-box;
        scroll-margin-top: 12px;
    }

    .builder-slot-list {
        order: 2;
        width: 100%;
    }

    .editor-slot-nav {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 8px;
        align-items: center;
        margin: -4px 0 18px;
    }

    .editor-slot-nav span {
        color: #667085;
        font-size: 12px;
        font-weight: 800;
        text-align: center;
    }

    .editor-slot-nav button {
        min-height: 42px;
        appearance: none;
        border: 1px solid #e4e7ec;
        border-radius: 10px;
        background: #f9fafb;
        color: #344054;
        font-weight: 800;
    }

    .editor-slot-nav button:disabled {
        opacity: .38;
    }
}
