/* BP Contact Form — scoped styles */

.bpcf-form-wrapper {
    --bpcf-navy: #1B2A4A;
    --bpcf-card: #ffffff;
    --bpcf-input-bg: #E4EAF0;
    --bpcf-brown: #8B6F47;
    --bpcf-brown-hover: #7A6140;
    --bpcf-beige: #D4C5A9;
    --bpcf-beige-hover: #C4B599;
    --bpcf-red: #E53935;
    --bpcf-progress-bg: #D4D9E0;
    --bpcf-progress-fill: #2B4C7E;
    --bpcf-text: #1a1a1a;
    --bpcf-label: #2c3e50;
    --bpcf-radius: 8px;

    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 640px;
    margin: 0 auto;
    color: var(--bpcf-text);
}

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

/* Honeypot */
.bpcf-hp {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* Steps */
.bpcf-step {
    display: none;
}

.bpcf-step--active {
    display: block;
    animation: bpcfFadeIn 0.3s ease;
}

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

/* Typography */
.bpcf-subtitle {
    font-style: italic;
    color: var(--bpcf-beige);
    margin: 0 0 8px;
    font-size: 16px;
}

.bpcf-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 24px;
    color: var(--bpcf-text);
}

/* Card */
.bpcf-card {
    background: var(--bpcf-card);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* Fields */
.bpcf-field {
    margin-bottom: 16px;
}

.bpcf-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--bpcf-label);
    margin-bottom: 6px;
}

.bpcf-req {
    color: var(--bpcf-red);
}

.bpcf-field input[type="text"],
.bpcf-field input[type="email"],
.bpcf-field input[type="tel"],
.bpcf-field select,
.bpcf-field textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 2px solid transparent;
    border-radius: var(--bpcf-radius);
    background: var(--bpcf-input-bg);
    color: var(--bpcf-text);
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.bpcf-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='%23666' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.bpcf-field textarea {
    resize: vertical;
    min-height: 120px;
}

.bpcf-field input:focus,
.bpcf-field select:focus,
.bpcf-field textarea:focus {
    outline: none;
    border-color: var(--bpcf-progress-fill);
}

.bpcf-field input.bpcf-invalid,
.bpcf-field select.bpcf-invalid,
.bpcf-field textarea.bpcf-invalid {
    border-color: var(--bpcf-red);
}

.bpcf-error {
    display: block;
    font-size: 12px;
    color: var(--bpcf-red);
    min-height: 18px;
    margin-top: 4px;
}

/* Phone wrapper */
.bpcf-phone-wrapper {
    display: flex;
    align-items: center;
    background: var(--bpcf-input-bg);
    border-radius: var(--bpcf-radius);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.bpcf-phone-wrapper:focus-within {
    border-color: var(--bpcf-progress-fill);
}

.bpcf-phone-wrapper.bpcf-invalid {
    border-color: var(--bpcf-red);
}

.bpcf-phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0 12px 14px;
    font-size: 15px;
    color: var(--bpcf-text);
    white-space: nowrap;
    user-select: none;
}

.bpcf-phone-wrapper input[type="tel"] {
    background: transparent;
    border: none;
    border-radius: 0;
    padding-left: 8px;
    flex: 1;
}

.bpcf-phone-wrapper input[type="tel"]:focus {
    border-color: transparent;
}

/* Checkbox */
.bpcf-field--checkbox label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.bpcf-field--checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--bpcf-progress-fill);
    cursor: pointer;
}

.bpcf-field--checkbox a {
    color: var(--bpcf-progress-fill);
    text-decoration: underline;
}

/* Progress bar */
.bpcf-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    font-size: 13px;
    color: #666;
}

.bpcf-progress span {
    white-space: nowrap;
}

.bpcf-progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bpcf-progress-bg);
    border-radius: 3px;
    overflow: hidden;
}

.bpcf-progress-fill {
    height: 100%;
    background: var(--bpcf-progress-fill);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Buttons */
.bpcf-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.bpcf-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 0.5px;
    border: none;
    border-radius: var(--bpcf-radius);
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
    text-align: center;
}

.bpcf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.bpcf-btn--next,
.bpcf-btn--submit {
    background: var(--bpcf-brown);
    color: #fff;
}

.bpcf-btn--next:hover,
.bpcf-btn--submit:hover {
    background: var(--bpcf-brown-hover);
}

.bpcf-btn--prev {
    background: var(--bpcf-beige);
    color: var(--bpcf-text);
}

.bpcf-btn--prev:hover {
    background: var(--bpcf-beige-hover);
}

/* Success step */
.bpcf-step--success .bpcf-card {
    text-align: center;
    padding: 48px 24px;
}

.bpcf-step--success .bpcf-title {
    color: var(--bpcf-brown);
    margin-bottom: 12px;
}

.bpcf-step--success p {
    font-size: 16px;
    color: #555;
}

/* Turnstile */
.bpcf-turnstile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

/* Spinner */
.bpcf-btn .bpcf-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: bpcfSpin 0.6s linear infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes bpcfSpin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 480px) {
    .bpcf-card {
        padding: 20px 16px;
    }

    .bpcf-title {
        font-size: 19px;
    }
}
