#swm-line-builder {
    margin: 1.2em 0;
}

.swm-lines {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.swm-line {
    display: flex;
    align-items: center;
    gap: 0.6em;
    flex-wrap: wrap;
}

.swm-line-label {
    min-width: 4.5em;
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
}

.swm-select {
    flex: 1 1 160px;
    min-width: 0;
    padding: 0.45em 0.6em;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.95em;
    background-color: #fff;
}

.swm-select:focus {
    outline: 2px solid #2271b1;
    outline-offset: 1px;
    border-color: #2271b1;
}

.swm-remove-line {
    flex-shrink: 0;
    background: none;
    border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    padding: 0.35em 0.55em;
    font-size: 0.85em;
    line-height: 1;
    color: #666;
    transition: background-color 0.15s, color 0.15s;
}

.swm-remove-line:hover {
    background-color: #e53e3e;
    border-color: #e53e3e;
    color: #fff;
}

.swm-weight-label {
    margin: 0.8em 0 0.4em;
    font-size: 0.9em;
    color: #555;
    font-style: italic;
}

.swm-add-line-btn {
    margin-top: 0.5em;
    background: none;
    border: 1px dashed #aaa;
    border-radius: 3px;
    padding: 0.4em 0.9em;
    cursor: pointer;
    font-size: 0.9em;
    color: #444;
    transition: border-color 0.15s, color 0.15s;
}

.swm-add-line-btn:hover {
    border-color: #2271b1;
    color: #2271b1;
}

.swm-error {
    margin-top: 0.6em;
    padding: 0.5em 0.8em;
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    color: #c0392b;
    font-size: 0.9em;
}

.swm-order-breakdown {
    margin-top: 0.4em;
    font-size: 0.85em;
    color: #444;
}

.swm-order-line {
    line-height: 1.6;
}

.swm-order-excluded {
    color: #c0392b;
}

/* ---------------------------------------------------------------------------
   Pre-pack builder
   --------------------------------------------------------------------------- */

#swm-prepack-builder {
    margin: 1.2em 0;
}

.swm-prepack-heading,
.swm-exclusions-heading {
    font-weight: 600;
    margin: 0 0 0.4em;
}

.swm-prepack-list {
    list-style: none;
    margin: 0 0 1.2em;
    padding: 0;
    border: 1px solid #eee;
    border-radius: 4px;
}

.swm-prepack-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45em 0.8em;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95em;
}

.swm-prepack-item:last-child {
    border-bottom: none;
}

.swm-prepack-item.swm-excluded .swm-prepack-name {
    text-decoration: line-through;
    color: #aaa;
}

.swm-prepack-grams {
    font-size: 0.85em;
    color: #777;
    white-space: nowrap;
    margin-left: 1em;
}

.swm-prepack-item.swm-excluded .swm-prepack-grams {
    color: #c0392b;
    font-style: italic;
}

.swm-exclusions-help {
    margin: 0 0 0.6em;
    font-size: 0.85em;
    color: #777;
}

.swm-exclusion-rows {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.swm-exclusion-row {
    display: flex;
    align-items: center;
    gap: 0.6em;
    flex-wrap: wrap;
}

.swm-prepack-size-hint {
    margin: 0.4em 0 1em;
    font-size: 0.82em;
    color: #999;
    font-style: italic;
}
