/* stripe-card-element.css — Styling for the embedded Stripe card form */

/* ─── Card Form Container ─────────────────────────────────────────── */
.stripe-card-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ─── Field Groups ────────────────────────────────────────────────── */
.stripe-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stripe-field-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
}

/* ─── Stripe Element Mount Points ─────────────────────────────────── */
.stripe-element-wrapper {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.stripe-element-wrapper > * {
    width: 100%;
}

.stripe-element-wrapper:focus-within {
    border-color: hsl(224 76% 48%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.stripe-element-wrapper.StripeElement--invalid,
.stripe-element-wrapper.stripe-element-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* ─── Name on Card (standard HTML input) ─────────────────────────── */
.stripe-name-input {
    width: 100%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 15px;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 48px;
    box-sizing: border-box;
}

.stripe-name-input::placeholder {
    color: #94a3b8;
}

.stripe-name-input:focus {
    border-color: hsl(224 76% 48%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ─── Card Number + Icon Row ─────────────────────────────────────── */
.stripe-card-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ─── Error Message ──────────────────────────────────────────────── */
.stripe-error-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #dc2626;
    animation: stripe-slide-in 0.2s ease;
}

.stripe-error-message .error-icon {
    font-size: 15px;
    flex-shrink: 0;
}

@keyframes stripe-slide-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Amount Badge ───────────────────────────────────────────────── */
.stripe-amount-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
    color: hsl(224 76% 48%);
}

/* ─── Security Badge ─────────────────────────────────────────────── */
.stripe-security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #94a3b8;
    padding-top: 4px;
}

.stripe-security-note svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #94a3b8;
}

/* ─── Processing Spinner ─────────────────────────────────────────── */
.stripe-processing {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    font-size: 14px;
    color: #64748b;
}

/* ─── Success Panel ──────────────────────────────────────────────── */
.payment-success-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 32px;
    text-align: center;
    animation: success-fade-in 0.5s ease;
}

@keyframes success-fade-in {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.success-circle-wrapper {
    position: relative;
    margin-bottom: 28px;
}

.success-circle {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 16px rgba(34, 197, 94, 0.12), 0 0 40px rgba(34, 197, 94, 0.3);
    animation: success-pulse 2s ease-in-out infinite;
}

@keyframes success-pulse {
    0%, 100% { box-shadow: 0 0 0 16px rgba(34, 197, 94, 0.12), 0 0 40px rgba(34, 197, 94, 0.3); }
    50%       { box-shadow: 0 0 0 24px rgba(34, 197, 94, 0.06), 0 0 50px rgba(34, 197, 94, 0.4); }
}

.success-circle svg {
    width: 42px;
    height: 42px;
    stroke: #fff;
    stroke-width: 2.5px;
    fill: none;
    animation: success-draw 0.5s ease 0.1s both;
}

@keyframes success-draw {
    from { stroke-dashoffset: 60; opacity: 0; }
    to   { stroke-dashoffset: 0;  opacity: 1; }
}

.success-title {
    font-size: 26px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 10px;
}

.success-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0 0 8px;
    line-height: 1.5;
}

.success-redirect-note {
    font-size: 13px;
    color: #64748b;
    margin: 16px 0 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.success-redirect-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-top-color: #64748b;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

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