/* Box Pricing Plugin - Premium UI (brand color default #a36531) */

.bpp-wrapper {
    --bpp-brand: #a36531;
    --bpp-brand-dark: #7f4f26;
    --bpp-brand-light: #f4ede7;
    --bpp-ink: #2b2420;
    --bpp-muted: #7a716b;
    --bpp-border: #e7ddd3;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    max-width: 1000px;
    margin: 32px auto;
    box-sizing: border-box;
}

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

.bpp-card {
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(43, 36, 32, 0.08), 0 2px 8px rgba(43, 36, 32, 0.06);
    overflow: hidden;
    border: 1px solid var(--bpp-border);
}

.bpp-form-col {
    flex: 1 1 420px;
    padding: 40px;
    background: #fffdfb;
}

.bpp-preview-col {
    flex: 1 1 320px;
    padding: 40px;
    background: linear-gradient(160deg, var(--bpp-brand-light) 0%, #fff 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid var(--bpp-border);
}

.bpp-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    color: var(--bpp-ink);
    letter-spacing: -0.02em;
}

.bpp-subtitle {
    margin: 0 0 28px;
    color: var(--bpp-muted);
    font-size: 14px;
}

.bpp-field-row {
    display: flex;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.bpp-field {
    flex: 1 1 0;
    min-width: 120px;
    display: flex;
    flex-direction: column;
}

.bpp-field-wide {
    flex: 2 1 200px;
}

.bpp-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--bpp-muted);
    margin-bottom: 8px;
}

.bpp-field input[type="number"],
.bpp-field input[type="text"],
.bpp-field input[type="email"],
.bpp-field select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--bpp-border);
    background: #fff;
    font-size: 15px;
    color: var(--bpp-ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
}

.bpp-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a716b' stroke-width='1.6' fill='none' fill-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 34px;
}

.bpp-field input:focus,
.bpp-field select:focus {
    outline: none;
    border-color: var(--bpp-brand);
    box-shadow: 0 0 0 4px rgba(163, 101, 49, 0.12);
}

.bpp-image-frame {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--bpp-border);
    box-shadow: 0 8px 24px rgba(43, 36, 32, 0.08);
    margin-bottom: 24px;
}

.bpp-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s ease;
}

.bpp-results {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border: 1px solid var(--bpp-border);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 20px;
}

.bpp-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 0;
}

.bpp-result-row + .bpp-result-row {
    border-top: 1px dashed var(--bpp-border);
}

.bpp-result-label {
    font-size: 13px;
    color: var(--bpp-muted);
    font-weight: 600;
}

.bpp-result-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--bpp-brand-dark);
}

.bpp-calc-error {
    display: none;
    width: 100%;
    max-width: 320px;
    background: #fdecea;
    color: #c62828;
    font-size: 12.5px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    text-align: left;
}

.bpp-btn-primary {
    width: 100%;
    max-width: 320px;
    background: linear-gradient(135deg, var(--bpp-brand) 0%, var(--bpp-brand-dark) 100%);
    color: #fff;
    border: none;
    padding: 15px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(163, 101, 49, 0.32);
    transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    position: relative;
}

.bpp-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 26px rgba(163, 101, 49, 0.4);
}

.bpp-btn-primary:active {
    transform: translateY(0);
}

.bpp-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.bpp-btn-block {
    max-width: none;
}

.bpp-btn-loading .bpp-btn-text::after {
    content: "...";
}

.bpp-note {
    margin-top: 14px;
    font-size: 12px;
    color: var(--bpp-muted);
    text-align: center;
    max-width: 320px;
}

/* ---------------- Modal ---------------- */

.bpp-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(43, 36, 32, 0.55);
    backdrop-filter: blur(3px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.bpp-modal-overlay.bpp-modal-open {
    display: flex;
}

body.bpp-modal-active {
    overflow: hidden;
}

.bpp-modal {
    background: #fff;
    border-radius: 18px;
    padding: 36px;
    max-width: 440px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    animation: bpp-modal-in 0.18s ease;
}

@keyframes bpp-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.bpp-modal h3 {
    margin: 0 0 4px;
    font-size: 21px;
    color: #2b2420;
    font-weight: 700;
}

.bpp-modal-subtitle {
    margin: 0 0 20px;
    font-size: 13px;
    color: #7a716b;
}

.bpp-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f4ede7;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: #7a716b;
    cursor: pointer;
    transition: background 0.12s ease;
}

.bpp-modal-close:hover {
    background: #e7ddd3;
}

.bpp-modal-summary {
    background: #f4ede7;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    font-size: 13px;
}

.bpp-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    color: #2b2420;
}

.bpp-summary-row span {
    color: #7a716b;
}

.bpp-modal .bpp-field {
    margin-bottom: 16px;
}

.bpp-modal-message {
    display: none;
    font-size: 13px;
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.bpp-message-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.bpp-message-error {
    background: #fdecea;
    color: #c62828;
}
#bpp-quote-submit {
    background: #a36531 !important;
}
/* ---------------- Responsive ---------------- */

@media (max-width: 720px) {
    .bpp-form-col,
    .bpp-preview-col {
        padding: 28px 24px;
    }
    .bpp-preview-col {
        border-left: none;
        border-top: 1px solid var(--bpp-border);
    }
    .bpp-image-frame,
    .bpp-results,
    .bpp-btn-primary,
    .bpp-note {
        max-width: 100%;
    }
}
