/* WP Card Authorization — Frontend Form */
*, *::before, *::after { box-sizing: border-box; }

.wpca-wrap {
    max-width: 560px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
}

/* Card container */
.wpca-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 32px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

/* ── Header: title+badge on one line, description below ── */
.wpca-card-header {
    margin-bottom: 24px;
}

.wpca-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.wpca-title {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.wpca-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 500;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
    margin-top: 2px;
}

.wpca-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.wpca-desc strong { color: #111827; }

/* Alert */
.wpca-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}
.wpca-alert--error   { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.wpca-alert--success { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Fields */
.wpca-field { margin-bottom: 18px; }
.wpca-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}
.wpca-req { color: #dc2626; }

.wpca-field input[type="text"],
.wpca-field input[type="email"],
.wpca-field input[type="tel"] {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.wpca-field input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.wpca-field input::placeholder { color: #9ca3af; }

/* Stripe element containers */
.wpca-stripe-element {
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 0.15s, box-shadow 0.15s;
    min-height: 42px;
}
.wpca-stripe-element.StripeElement--focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.wpca-stripe-element.StripeElement--invalid { border-color: #dc2626; }

.wpca-field-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 5px;
    min-height: 16px;
}

/* Row layout (expiry + cvc) */
.wpca-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ZIP row */
.wpca-zip-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.wpca-zip-note { font-size: 12px; color: #9ca3af; }

/* Submit button */
.wpca-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: #111827;
    background: #fbbf24;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.wpca-btn:hover:not(:disabled) { background: #f59e0b; }
.wpca-btn:active:not(:disabled) { transform: scale(0.99); }
.wpca-btn:disabled { opacity: 0.7; cursor: not-allowed; }

.wpca-btn-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}
.wpca-btn-spinner svg { animation: wpca-spin 1s linear infinite; }
@keyframes wpca-spin { to { transform: rotate(360deg); } }

/* ── Success box — hidden by default, shown via JS inline style ── */
#wpca-success,
.wpca-success {
    display: none;
}

.wpca-success-text {
    font-size: 18px;
    font-weight: 600;
    color: #15803d;
    margin: 0;
}
.wpca-success-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    max-width: 380px;
    text-align: center;
    line-height: 1.6;
}

/* Notice */
.wpca-notice {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}
.wpca-notice--warn { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }

/* ── Mobile ── */
@media (max-width: 520px) {
    .wpca-card { padding: 22px 18px; }
    .wpca-title { font-size: 17px; }
    .wpca-row { grid-template-columns: 1fr; gap: 0; }
    .wpca-zip-row { flex-direction: column; align-items: flex-start; gap: 6px; }
}
