.em-swaps-pref {
    max-width: 520px;
    margin-bottom: 32px;
}

.em-swaps-pref h3 {
    margin: 0 0 8px;
}

.em-swaps-pref-add {
    position: relative;
    margin-bottom: 12px;
}

.em-swaps-pref-add label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.em-swaps-pref-add input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d7d7d7;
    border-radius: 4px;
    font-size: 15px;
    box-sizing: border-box;
}

.em-swaps-pref-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-top: none;
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 100;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.em-swaps-pref-suggestions li {
    padding: 8px 12px;
    cursor: pointer;
    list-style: none;
}

.em-swaps-pref-suggestions li:hover,
.em-swaps-pref-suggestions li:focus {
    background: #f8fbf7;
}

.em-swaps-pref-list {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.em-swaps-pref-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f8fbf7;
    border: 1px solid #d7d7d7;
    margin-bottom: 4px;
    border-radius: 4px;
    list-style: none;
    line-height: 1.3;
    min-height: 0;
}

.em-swaps-pref-list li > span {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 8px;
}

/* Allergies — stronger visual emphasis. */
.em-swaps-pref--allergies h3 {
    color: #b32d2e;
}

.em-swaps-pref--allergies .em-swaps-pref-list li {
    background: #fdf2f2;
    border-left: 4px solid #d63638;
}

.em-swaps-pref-list .em-swaps-pref-empty {
    color: #777;
    background: transparent;
    border: 1px dashed #d7d7d7;
    border-left-width: 1px;
    justify-content: flex-start;
}

/* Force a circular button regardless of theme button padding / min-width.
 * Many WC themes add horizontal padding to all <button>s — without these
 * resets it renders as a squashed oval. */
.em-swaps-pref-remove {
    background: #d63638;
    color: #fff;
    border: none;
    box-sizing: border-box;
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    flex: 0 0 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    -webkit-appearance: none;
    appearance: none;
}

.em-swaps-pref-remove:hover,
.em-swaps-pref-remove:focus {
    background: #b32d2e;
}
