/* APBP Store Features — product personalisation.
   Written for customers who may be older: large type, strong contrast, big
   click targets, everything visible at once and no motion. Colours follow the
   shop theme (teal headings, coral accent). Rules are scoped under .bpp-simple
   because the theme restyles bare buttons, labels, inputs and fieldsets. */

.bpp-simple {
    --bpp-accent-dark: #b83a22;          /* shop coral, darkened for text and focus (AA) */
    --bpp-accent-wash: #fff4f0;
    --bpp-ink: #0d404f;
    --bpp-text: #262626;
    --bpp-muted: #4d4d4d;
    --bpp-line: #d8d0c4;
    --bpp-field-line: #857a6b;           /* at least 3:1 against white, as form borders need */
    --bpp-surface: #fff;
    --bpp-sunken: #faf7f2;
    --bpp-font: Lora, Georgia, serif;

    /* BeTheme lays form.cart out as a single non-wrapping flex row; the block
       has to claim a full row of its own above quantity and the button. */
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px;
    padding: 20px;
    border: 1px solid var(--bpp-line);
    border-radius: 8px;
    background: var(--bpp-surface);
    color: var(--bpp-text);
    font-family: var(--bpp-font);
    font-size: 17px;
    line-height: 1.5;
}

form.cart:has(> .bpp-simple),
form.cart.bpp-form {
    flex-wrap: wrap;
}

.bpp-simple *,
.bpp-simple *::before,
.bpp-simple *::after {
    box-sizing: border-box;
}

.bpp-simple [hidden] {
    display: none !important;
}

/* Question ----------------------------------------------------------------- */

.bpp-simple .bpp-choice {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

.bpp-simple .bpp-question {
    display: block;
    float: none;
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    font-family: var(--bpp-font);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    text-transform: none;
    color: var(--bpp-ink);
}

.bpp-simple .bpp-option {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    margin: 0 0 10px;
    padding: 14px 16px;
    border: 2px solid var(--bpp-line);
    border-radius: 8px;
    background: var(--bpp-surface);
    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;
    cursor: pointer;
}

.bpp-simple .bpp-option:last-child {
    margin-bottom: 0;
}

.bpp-simple .bpp-option:hover {
    border-color: var(--bpp-field-line);
}

.bpp-simple .bpp-option.is-checked,
.bpp-simple .bpp-option:has(input:checked) {
    border-color: var(--bpp-accent-dark);
    background: var(--bpp-accent-wash);
}

/* Native radio, only enlarged: familiar to everyone, and some themes hide it. */
.bpp-simple .bpp-option input[type="radio"] {
    -webkit-appearance: auto;
    appearance: auto;
    position: static;
    display: inline-block;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    margin: 0;
    opacity: 1;
    visibility: visible;
    accent-color: var(--bpp-accent-dark);
    cursor: pointer;
}

.bpp-simple .bpp-option input[type="radio"]:focus-visible {
    outline: 3px solid var(--bpp-ink);
    outline-offset: 3px;
}

.bpp-simple .bpp-option-text strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--bpp-text);
}

.bpp-simple .bpp-option-text span {
    display: block;
    margin-top: 2px;
    font-size: 16px;
    color: var(--bpp-muted);
}

/* Names: shown once "Sim" is chosen. Opens through :has() without JavaScript;
   .is-open covers browsers without :has(). */

.bpp-simple .bpp-names {
    display: none;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 2px solid #eee7dc;
}

.bpp-simple:has(#bpp_enable_yes:checked) .bpp-names,
.bpp-simple .bpp-names.is-open {
    display: block;
}

.bpp-simple .bpp-intro {
    margin: 0 0 16px;
    font-size: 16px;
    line-height: 1.55;
    color: var(--bpp-muted);
}

.bpp-simple .bpp-error {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-left: 5px solid #c0392b;
    border-radius: 4px;
    background: #fdecea;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.45;
    color: #7a1f14;
}

.bpp-simple .bpp-field {
    margin: 0 0 16px;
}

.bpp-simple .bpp-field label {
    display: block;
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--bpp-ink);
}

.bpp-simple .bpp-field input[type="text"] {
    display: block;
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 14px;
    border: 2px solid var(--bpp-field-line);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    font-family: var(--bpp-font);
    font-size: 18px;
    line-height: normal;
    color: var(--bpp-text);
}

.bpp-simple .bpp-field input[type="text"]:focus {
    border-color: var(--bpp-accent-dark);
    outline: 3px solid rgba(184, 58, 34, .25);
    outline-offset: 1px;
}

.bpp-simple .bpp-limit {
    display: block;
    margin-top: 6px;
    font-size: 15px;
    color: #7a1f14;
}

/* A real, clearly labelled button rather than a small text link. */
.bpp-simple .bpp-repeat,
.bpp-simple .bpp-repeat:hover,
.bpp-simple .bpp-repeat:focus,
.bpp-simple .bpp-repeat:active {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 48px;
    margin: 10px 0 0;
    padding: 10px 16px;
    border: 2px solid var(--bpp-ink);
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    font-family: var(--bpp-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: normal;
    color: var(--bpp-ink);
    text-align: left;
    text-decoration: none;
    text-transform: none;
    white-space: normal;
    cursor: pointer;
    transform: none;
}

.bpp-simple .bpp-repeat::before,
.bpp-simple .bpp-repeat::after {
    content: none;
}

.bpp-simple .bpp-repeat:hover {
    background: #eef4f5;
}

.bpp-simple .bpp-repeat:focus-visible {
    outline: 3px solid var(--bpp-accent-dark);
    outline-offset: 2px;
}

/* Summary ------------------------------------------------------------------ */

.bpp-simple .bpp-summary {
    margin-top: 4px;
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--bpp-sunken);
}

.bpp-simple .bpp-summary-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 16px;
    margin: 0;
    font-size: 17px;
    line-height: 1.4;
}

.bpp-simple .bpp-summary-line + .bpp-summary-line {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--bpp-line);
}

.bpp-simple .bpp-fee,
.bpp-simple .bpp-total {
    margin-left: auto;
    font-weight: 700;
    white-space: nowrap;
}

.bpp-simple .bpp-fee {
    font-size: 17px;
    color: var(--bpp-text);
}

.bpp-simple .bpp-summary-total span {
    font-size: 19px;
    font-weight: 700;
    color: var(--bpp-ink);
}

.bpp-simple .bpp-total {
    font-size: 22px;
    color: var(--bpp-accent-dark);
}

@media (max-width: 480px) {
    .bpp-simple {
        padding: 16px;
    }
}

/* Quantity lock ------------------------------------------------------------- */

.bpp-simple .bpp-lock-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 5px solid var(--bpp-ink);
    border-radius: 4px;
    background: #eef4f5;
    font-size: 16px;
    line-height: 1.5;
    color: var(--bpp-ink);
}

/* While personalising the quantity stays at 1, so the theme's +/- controls
   would only bounce back; hide them but keep their space. */
form.cart.bpp-qty-locked .quantity .plus,
form.cart.bpp-qty-locked .quantity .minus,
form.cart.bpp-qty-locked .quantity .quantity-change {
    visibility: hidden;
    pointer-events: none;
}

form.cart.bpp-qty-locked .quantity input.qty {
    background: #f3efe9;
    cursor: not-allowed;
}
