/* Final marketplace results-toolbar polish.
 * Keep the count and sort control comfortably inside the panel on narrow
 * screens, and replace the low-contrast native select chevron.
 */
.app-results-toolbar {
    box-sizing: border-box;
    width: 100%;
    padding: 12px clamp(20px, 2.4vw, 28px) !important;
    column-gap: 16px !important;
    row-gap: 10px !important;
}

.app-results-toolbar > div:first-child {
    flex: 0 1 auto;
    min-width: max-content;
    white-space: nowrap;
    line-height: 1.25;
}

.app-results-toolbar .results-toolbar-actions {
    flex: 0 0 auto;
    max-width: 100%;
    margin-left: auto;
}

.app-results-toolbar .results-toolbar-actions form {
    position: relative;
    display: block;
    max-width: 100%;
    margin: 0;
}

.app-results-toolbar .results-toolbar-actions form::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-68%) rotate(45deg);
    opacity: .72;
    pointer-events: none;
}

.app-results-toolbar select {
    width: clamp(160px, 18vw, 196px);
    max-width: 100%;
    min-width: 0 !important;
    min-height: 44px !important;
    margin: 0;
    padding: 0 44px 0 16px !important;
    border-radius: 10px;
    appearance: none;
    -webkit-appearance: none;
    background-image: none !important;
    text-overflow: ellipsis;
}

@media (max-width: 760px) {
    .app-results-toolbar {
        min-height: 72px !important;
        padding: 12px 24px !important;
        gap: 12px !important;
        flex-wrap: nowrap !important;
    }

    .app-results-toolbar > div:first-child {
        flex: 1 1 auto;
        min-width: 0;
        margin: 0 !important;
    }

    .app-results-toolbar .results-toolbar-actions {
        flex: 0 0 auto;
        margin: 0 0 0 auto !important;
    }

    .app-results-toolbar select {
        width: clamp(150px, 41vw, 172px);
        max-width: 100%;
        min-height: 44px !important;
        padding-inline: 14px 40px !important;
        font-size: 1rem;
    }

    .app-results-toolbar .results-toolbar-actions form::after {
        right: 15px;
    }
}

@media (max-width: 350px) {
    .app-results-toolbar {
        padding-inline: 16px !important;
        gap: 8px !important;
    }

    .app-results-toolbar select {
        width: 140px;
        font-size: .95rem;
    }
}
