.sheet-cuts {
    margin: 0 0 20px;
    padding: 15px;
    border: 1px solid #e3e3e3;
    border-radius: 3px;
    background: #fafafa;
}

.sheet-cuts__title {
    margin: 0 0 8px;
}

.sheet-cuts__intro {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: #555;
}

.sheet-cuts__notice {
    margin: 0 0 10px;
    font-size: 1.3rem;
    color: red;
}

.sheet-cuts__pieces {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.sheet-cuts__piece {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sheet-cuts__piece-label {
    flex: 0 0 48px;
    font-weight: 600;
    text-wrap-mode: nowrap;
}

.sheet-cuts__by {
    flex: 0 0 auto;
}

.sheet-cuts__length {
    flex: 1 1 100px;
    max-width: 120px;
}

.sheet-cuts__qty-label {
    flex: 0 0 auto;
    font-weight: 600;
}

.sheet-cuts__qty {
    flex: 0 0 36px;
    max-width: 60px;
}

.sheet-cuts__remove {
    flex: 0 0 auto;
    border: unset;
    color: #ffffff;
    background: #b71c1c;
    width: 28px;
    height: 28px;
    line-height: 1;
    padding: 0;
}

.sheet-cuts__add {
    display: inline-block;
    margin-bottom: 12px;
}

.sheet-cuts__diagram {
    margin: 10px 0;
    background: #ffffff;
    border: 1px solid #e3e3e3;
}

.sheet-cuts__svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 320px;
}

.sheet-cuts__svg-sheet {
    fill: #f0f0f0;
    stroke: #999999;
    stroke-width: 2;
}

.sheet-cuts__svg-cut {
    stroke: #444444;
    stroke-opacity: 0.55;
}

.sheet-cuts__svg-label {
    fill: #eee;
    font-weight: 600;
    pointer-events: none;
}

.sheet-cuts__svg-label--invalid {
    fill: #d0021b;
    font-weight: 700;
}

.sheet-cuts__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #555;
}

.sheet-cuts__summary {
    margin-top: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 1.75rem;
}

.sheet-cuts__status {
    margin-top: 10px;
}

/*
 * Explicit, self-contained state colours for this widget's status box,
 * scoped to .sheet-cuts so they don't touch the site-wide .message styling
 * used elsewhere (cart notices, form validation, etc). The theme's global
 * override recolours .message.error to a clean white box with a solid
 * border, but in teal (#008872) rather than red, and .message.success (the
 * space-separated classes this widget actually applies) isn't covered by
 * that override at all, so it fell back to Magento's plain grey default.
 * Warning already looked right (yellow, bordered) so it's kept that way;
 * success gets the same clean bordered-box treatment in green, and error
 * gets it in red.
 */
.sheet-cuts .sheet-cuts__status.warning,
.sheet-cuts .sheet-cuts__status.success,
.sheet-cuts .sheet-cuts__status.error {
    padding: 10px 15px;
    border-width: 2px;
    border-style: solid;
    border-radius: 3px;
    font-weight: 600;
}

.sheet-cuts .sheet-cuts__status.warning {
    background: #fff8e1;
    border-color: #f0c14b;
    color: #7a5c00;
}

.sheet-cuts .sheet-cuts__status.success {
    background: #ffffff;
    border-color: #2e7d32;
    color: #2e7d32;
}

.sheet-cuts .sheet-cuts__status.error {
    background: #ffffff;
    border-color: #c62828;
    color: #c62828;
}

/*
 * An icon before the message text, in the same colour as the text. Plain
 * text-presentation characters (not emoji-style glyphs) so `color` reliably
 * applies rather than being ignored in favour of a fixed emoji colour.
 * ::before is independent of the element's text content, so this needs no
 * change to setStatus()'s plain .text(message) call in sheet-cuts.js.
 */
.sheet-cuts .sheet-cuts__status.warning::before,
.sheet-cuts .sheet-cuts__status.success::before,
.sheet-cuts .sheet-cuts__status.error::before {
    display: inline-block;
    margin-right: 8px;
    font-weight: 700;
}

.sheet-cuts .sheet-cuts__status.warning::before {
    content: '?';
    color: #7a5c00;
}

.sheet-cuts .sheet-cuts__status.success::before {
    content: '\2713';
    color: #2e7d32;
}

.sheet-cuts .sheet-cuts__status.error::before {
    content: '!';
    color: #c62828;
}
