/* =================================================================
   BeurreBros – Cake Order Form Styles v1.2
   ================================================================= */

.beurre-co-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: var(--theme-font-p_font-family, 'Work Sans', sans-serif);
}

/* ----- Progress Bar ----- */

.beurre-co-progress {
    margin-bottom: 2.5rem;
}

.beurre-co-progress-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.beurre-co-step-dot {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--theme-color-meta, #B2B0A8);
    background: var(--theme-color-bg_color_2, #EEEDE4);
    border: 2px solid var(--theme-color-bd_color, #E3E1D6);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.beurre-co-step-dot.active {
    background: #e796a0;
    border-color: #e796a0;
    color: #fff;
}

.beurre-co-step-dot.done {
    background: #d3af37;
    border-color: #d3af37;
    color: #fff;
}

.beurre-co-step-line {
    flex: 1;
    height: 2px;
    background: var(--theme-color-bd_color, #E3E1D6);
    transition: background 0.3s ease;
    max-width: 60px;
}

.beurre-co-step-line.done {
    background: #d3af37;
}

.beurre-co-step-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0 2px;
}

.beurre-co-step-labels span {
    font-size: 0.7rem;
    color: var(--theme-color-meta, #B2B0A8);
    text-align: center;
    flex: 1;
    transition: color 0.3s ease;
}

.beurre-co-step-labels span.active {
    color: var(--theme-color-title, #1F242E);
    font-weight: 600;
}

/* ----- Form Panels ----- */

.beurre-co-panel {
    border: none;
    padding: 0;
    margin: 0;
    animation: beurreCoFadeIn 0.35s ease;
}

@keyframes beurreCoFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.beurre-co-legend {
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--theme-color-title, #1F242E);
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--theme-color-bd_color, #E3E1D6);
    width: 100%;
}

/* ----- Step 1: Radio Cards ----- */

.beurre-co-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.beurre-co-card {
    cursor: pointer;
    display: block;
}

.beurre-co-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.beurre-co-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.25rem;
    border: 2px solid var(--theme-color-bd_color, #E3E1D6);
    border-radius: 12px;
    background: #fff;
    transition: all 0.25s ease;
}

.beurre-co-card-inner:hover {
    border-color: #e796a0;
    box-shadow: 0 4px 16px rgba(231, 150, 160, 0.12);
}

.beurre-co-card input:checked + .beurre-co-card-inner {
    border-color: #e796a0;
    background: rgba(231, 150, 160, 0.06);
    box-shadow: 0 4px 16px rgba(231, 150, 160, 0.15);
}

.beurre-co-card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.beurre-co-card-title {
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--theme-color-title, #1F242E);
    margin-bottom: 0.35rem;
}

.beurre-co-card-desc {
    font-size: 0.85rem;
    color: var(--theme-color-meta, #B2B0A8);
}

/* ----- Cake Entry Cards (Step 2) ----- */

.beurre-co-entry {
    border: 1px solid var(--theme-color-bd_color, #E3E1D6);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    background: #fff;
    animation: beurreCoFadeIn 0.3s ease;
}

.beurre-co-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.beurre-co-entry-label {
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-weight: 500;
    font-size: 0.9rem;
    color: #e796a0;
}

.beurre-co-entry-remove {
    background: none;
    border: none;
    color: var(--theme-color-meta, #B2B0A8);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.beurre-co-entry-remove:hover {
    color: #c0392b;
    background: rgba(192, 57, 43, 0.08);
}

.beurre-co-entry-type {
    display: inline-flex;
    background: var(--theme-color-bg_color_2, #EEEDE4);
    border-radius: 20px;
    padding: 3px;
    margin-bottom: 1rem;
    font-size: 0.8rem;
}

.beurre-co-entry-type label {
    cursor: pointer;
    display: block;
}

.beurre-co-entry-type input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.beurre-co-entry-type span {
    display: block;
    padding: 0.35rem 0.85rem;
    border-radius: 17px;
    color: var(--theme-color-meta, #B2B0A8);
    transition: all 0.2s ease;
    font-weight: 500;
}

.beurre-co-entry-type input:checked + span {
    background: #e796a0;
    color: #fff;
}

/* Cake description preview */
.beurre-co-cake-desc {
    font-size: 0.85rem;
    color: var(--theme-color-meta, #B2B0A8);
    font-style: italic;
    margin: -0.25rem 0 1rem;
    line-height: 1.5;
}

/* Price badge */
.beurre-co-price-badge {
    display: inline-block;
    background: rgba(211, 175, 55, 0.12);
    color: #b8962e;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    margin-top: 0.3rem;
}

/* ----- Fields ----- */

.beurre-co-field {
    margin-bottom: 1.25rem;
}

.beurre-co-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.35rem;
    color: var(--theme-color-title, #1F242E);
    font-size: 0.95rem;
}

.beurre-co-req {
    color: #e796a0;
}

.beurre-co-field input[type="text"],
.beurre-co-field input[type="email"],
.beurre-co-field input[type="tel"],
.beurre-co-field input[type="url"],
.beurre-co-field input[type="number"],
.beurre-co-field input[type="date"],
.beurre-co-field select,
.beurre-co-field textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--theme-color-bd_color, #E3E1D6);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--theme-color-title, #1F242E);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    box-sizing: border-box;
}

.beurre-co-field input:focus,
.beurre-co-field select:focus,
.beurre-co-field textarea:focus {
    outline: none;
    border-color: #e796a0;
    box-shadow: 0 0 0 3px rgba(231, 150, 160, 0.15);
}

.beurre-co-field.beurre-co-error input,
.beurre-co-field.beurre-co-error select,
.beurre-co-field.beurre-co-error textarea {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.beurre-co-field .beurre-co-error-msg {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

.beurre-co-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--theme-color-meta, #B2B0A8);
    margin-top: 0.3rem;
}

.beurre-co-row {
    display: flex;
    gap: 1.25rem;
}

.beurre-co-half {
    flex: 1;
}

/* ----- Range Slider (custom servings) ----- */

.beurre-co-slider-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.beurre-co-slider-wrap input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--theme-color-bd_color, #E3E1D6);
    outline: none;
    border: none;
    padding: 0;
}

.beurre-co-slider-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e796a0;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s ease;
}

.beurre-co-slider-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.beurre-co-slider-wrap input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e796a0;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.beurre-co-slider-value {
    min-width: 48px;
    text-align: center;
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--theme-color-title, #1F242E);
    background: var(--theme-color-bg_color_2, #EEEDE4);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
}

/* ----- Add Another Button ----- */

.beurre-co-add-wrap {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.beurre-co-add-btn {
    background: none;
    border: 1px dashed var(--theme-color-bd_color, #E3E1D6);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--theme-color-meta, #B2B0A8);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.beurre-co-add-btn:hover {
    border-color: #e796a0;
    color: #e796a0;
    background: rgba(231, 150, 160, 0.04);
}

/* ----- Order Total ----- */

.beurre-co-order-total {
    background: var(--theme-color-bg_color_2, #EEEDE4);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem;
}

.beurre-co-total-label {
    font-weight: 500;
    color: var(--theme-color-title, #1F242E);
    font-size: 0.9rem;
}

.beurre-co-total-value {
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-weight: 600;
    font-size: 1.25rem;
    color: #d3af37;
}

.beurre-co-total-hint {
    flex-basis: 100%;
    font-size: 0.75rem;
    color: var(--theme-color-meta, #B2B0A8);
}

/* ----- Checkbox ----- */

.beurre-co-checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 400;
    font-size: 0.9rem;
    line-height: 1.5;
}

.beurre-co-checkbox input[type="checkbox"] {
    margin-top: 0.25rem;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    accent-color: #e796a0;
}

/* ----- Notice / Disclaimer ----- */

.beurre-co-notice {
    background: rgba(211, 175, 55, 0.08);
    border-left: 3px solid #d3af37;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    color: var(--theme-color-title, #1F242E);
    line-height: 1.6;
    border-radius: 0 6px 6px 0;
}

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

.beurre-co-review {
    background: var(--theme-color-bg_color_2, #EEEDE4);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.beurre-co-review h4 {
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    color: #e796a0;
    margin: 0 0 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.beurre-co-review h4:not(:first-child) {
    margin-top: 1rem;
}

.beurre-co-review p {
    margin: 0 0 0.15rem;
    color: var(--theme-color-title, #1F242E);
}

.beurre-co-review .beurre-co-review-label {
    color: var(--theme-color-meta, #B2B0A8);
    font-size: 0.8rem;
}

/* ----- Navigation Buttons ----- */

.beurre-co-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.beurre-co-btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
}

.beurre-co-back {
    background: transparent;
    color: var(--theme-color-meta, #B2B0A8);
    border: 1px solid var(--theme-color-bd_color, #E3E1D6);
}

.beurre-co-back:hover {
    color: var(--theme-color-title, #1F242E);
    border-color: var(--theme-color-title, #1F242E);
}

.beurre-co-next {
    background: #e796a0;
    color: #fff;
    margin-left: auto;
}

.beurre-co-next:hover:not(:disabled) {
    background: #d3af37;
    transform: translateY(-1px);
}

.beurre-co-next:disabled,
.beurre-co-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ----- Submit Button ----- */

.beurre-co-submit {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    margin-top: 1.5rem;
    background: #e796a0;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-family: var(--theme-font-h3_font-family, 'Lexend', sans-serif);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.beurre-co-submit:hover:not(:disabled) {
    background: #d3af37;
    transform: translateY(-2px);
}

/* ----- Messages ----- */

.beurre-co-message {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    display: none;
}

.beurre-co-message.beurre-co-success {
    display: block;
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

.beurre-co-message.beurre-co-msg-error {
    display: block;
    background: #fdedec;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

/* ----- Responsive: Tablet ----- */

@media (max-width: 768px) {
    .beurre-co-wrap {
        max-width: 100%;
        padding: 0 0.75rem;
    }
    .beurre-co-step-line {
        max-width: 40px;
    }
    .beurre-co-step-labels span {
        font-size: 0.65rem;
    }
    .beurre-co-card-inner {
        padding: 1.5rem 1rem;
    }
}

/* ----- Responsive: Mobile ----- */

@media (max-width: 600px) {
    .beurre-co-wrap {
        padding: 0 0.5rem;
    }

    /* Progress bar */
    .beurre-co-progress {
        margin-bottom: 1.75rem;
    }
    .beurre-co-step-dot {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    .beurre-co-step-line {
        max-width: 28px;
    }
    .beurre-co-step-labels {
        display: none;
    }

    /* Step 1: Cards */
    .beurre-co-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .beurre-co-card-inner {
        padding: 1.25rem 1rem;
        flex-direction: row;
        gap: 0.75rem;
        text-align: left;
        align-items: center;
    }
    .beurre-co-card-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    /* Panel legends */
    .beurre-co-legend {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
    }

    /* Form rows — stack vertically */
    .beurre-co-row {
        flex-direction: column;
        gap: 0;
    }

    /* Entry cards */
    .beurre-co-entry {
        padding: 1rem;
        margin-bottom: 0.85rem;
        border-radius: 8px;
    }
    .beurre-co-entry-header {
        margin-bottom: 0.75rem;
    }
    .beurre-co-entry-label {
        font-size: 0.85rem;
    }
    .beurre-co-entry-remove {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }

    /* Type toggle */
    .beurre-co-entry-type {
        width: 100%;
        display: flex;
        justify-content: stretch;
    }
    .beurre-co-entry-type label {
        flex: 1;
        text-align: center;
    }
    .beurre-co-entry-type span {
        padding: 0.4rem 0.5rem;
        font-size: 0.78rem;
        display: block;
        text-align: center;
    }

    /* Fields */
    .beurre-co-field {
        margin-bottom: 1rem;
    }
    .beurre-co-field label {
        font-size: 0.9rem;
    }
    .beurre-co-field input[type="text"],
    .beurre-co-field input[type="email"],
    .beurre-co-field input[type="tel"],
    .beurre-co-field input[type="url"],
    .beurre-co-field input[type="number"],
    .beurre-co-field input[type="date"],
    .beurre-co-field select,
    .beurre-co-field textarea {
        padding: 0.65rem 0.85rem;
        font-size: 16px; /* prevents iOS zoom on focus */
    }

    /* Slider */
    .beurre-co-slider-wrap {
        gap: 0.75rem;
    }
    .beurre-co-slider-wrap input[type="range"] {
        height: 8px;
    }
    .beurre-co-slider-wrap input[type="range"]::-webkit-slider-thumb {
        width: 28px;
        height: 28px;
    }
    .beurre-co-slider-wrap input[type="range"]::-moz-range-thumb {
        width: 28px;
        height: 28px;
    }
    .beurre-co-slider-value {
        min-width: 42px;
        font-size: 1rem;
        padding: 0.25rem 0.4rem;
    }

    /* Add buttons */
    .beurre-co-add-wrap {
        flex-direction: column;
        gap: 0.5rem;
    }
    .beurre-co-add-btn {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem;
        font-size: 0.82rem;
    }

    /* Order total */
    .beurre-co-order-total {
        padding: 0.85rem 1rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Review */
    .beurre-co-review {
        padding: 1rem;
        font-size: 0.85rem;
    }
    .beurre-co-review h4 {
        font-size: 0.8rem;
    }

    /* Notice */
    .beurre-co-notice {
        padding: 0.75rem 0.85rem;
        font-size: 0.82rem;
    }

    /* Checkbox */
    .beurre-co-checkbox label {
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    /* Navigation */
    .beurre-co-nav {
        margin-top: 1.5rem;
        gap: 0.75rem;
    }
    .beurre-co-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.88rem;
        flex: 1;
        text-align: center;
    }
    .beurre-co-next {
        margin-left: 0;
    }

    /* Submit */
    .beurre-co-submit {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Messages */
    .beurre-co-message {
        font-size: 0.85rem;
        padding: 0.85rem 1rem;
    }

    /* Price badge */
    .beurre-co-price-badge {
        font-size: 0.75rem;
    }

    /* Cake description */
    .beurre-co-cake-desc {
        font-size: 0.8rem;
    }
}
