.pr-store-availability {
    /*
     * A flex item of .delivery-information-container - min-width:0 keeps a long label from
     * widening the row past the viewport on narrow screens.
     */
    min-width: 0;
    max-width: 100%;
    margin-top: .75rem;
}

.pr-store-availability__label {
    display: block;
    margin-bottom: .25rem;
}

.pr-store-availability__select {
    position: relative;
    max-width: 100%;
}

/*
 * The closed control. Every declaration below mirrors the theme's own
 *     select.form-control, select.form-control:focus { ... }
 * so this sits next to the real selects without looking like a different widget. The arrow is the
 * theme's own chevron inlined as a data URI rather than linked: the theme ships it under a webpack
 * content hash, which changes whenever the theme is rebuilt.
 */
.pr-store-availability__control {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 39px;
    margin-top: 10px;
    padding: 8px 33px 8px 15px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color, #111);
    background: var(--btn-2-bg, #fff) url("data:image/svg+xml,%3Csvg width='10' height='7' viewBox='0 0 10 7' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L5 5.5L9 1.5' stroke='%23333333' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center right 15px;
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    outline: 0;
    cursor: pointer;
    /* display:block already drops the disclosure triangle; these cover the older engines */
    list-style: none;
}

.pr-store-availability__control::-webkit-details-marker {
    display: none;
}

.pr-store-availability__control::marker {
    content: "";
}

/* One line, clipped with an ellipsis, exactly like the selected row of a select */
.pr-store-availability__value {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pr-store-availability__select[open] .pr-store-availability__control {
    border-color: #b8b8b8;
}

/*
 * The open panel. Pinned to the control's own edges, which is the entire point: unlike the native
 * popup it can never be wider than the block, so long rows wrap instead of running off screen.
 */
.pr-store-availability__menu {
    position: absolute;
    z-index: 20;
    top: 100%;
    right: 0;
    left: 0;
    box-sizing: border-box;
    max-height: 240px;
    margin: 2px 0 0;
    padding: 4px 0;
    overflow-y: auto;
    list-style: none;
    background: var(--btn-2-bg, #fff);
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.pr-store-availability__option {
    box-sizing: border-box;
    padding: 6px 15px;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-color, #111);
    cursor: pointer;
    /* Long addresses and notes wrap inside the panel instead of widening it */
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.pr-store-availability__option:hover {
    background: #f7f7f7;
}

/* The row the closed control is showing, highlighted the way a select marks its selected option */
.pr-store-availability__option--current,
.pr-store-availability__option--current:hover {
    background: #f2f2f2;
}
