/* WF WAF — PayPal Standalone Styles v1.0.0 */

.wf-pp-wrap {
    margin-top: 12px;
}

/* States */
.wf-pp-state {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
}

.wf-pp-state--loading {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}

.wf-pp-state--success {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
}

.wf-pp-state--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #dc2626;
}

.wf-pp-state--info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
}

/* Spinner */
.wf-pp-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wf-pp-spin 0.7s linear infinite;
    flex-shrink: 0;
}

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

/* ── paypal_checkout field ───────────────────────────────────────────────── */

.wf-paypal-checkout-field {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
}

/* Resumen del pedido */
.wf-ppc-summary-box {
    margin-bottom: 16px;
}
.wf-ppc-summary-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 10px;
}
.wf-ppc-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wf-ppc-summary-row td {
    padding: 5px 0;
    border-bottom: 1px solid #f3f4f6;
}
.wf-ppc-summary-label {
    color: #6b7280;
    width: 40%;
}
.wf-ppc-summary-value {
    font-weight: 600;
    color: #111827;
    text-align: right;
}
.wf-ppc-summary-row--highlight .wf-ppc-summary-value {
    font-size: 16px;
    color: #059669;
}

/* Botones y estados */
.wf-ppc-buttons { 
    min-height: 44px;
}
.wf-ppc-buttons div{ 
    display: flex;
    flex-wrap: wrap;
    gap:5px;
}
.wf-ppc-buttons div div{ 
    width: 100% !important;
}
@media(max-width:660px){
    .wf-ppc-buttons div div{ 
    width: 100% !important;
}
}
.wf-ppc-error {
    color: #dc2626;
    font-size: 12px;
    padding: 8px;
    background: #fef2f2;
    border-radius: 6px;
    margin: 0;
}

/* Éxito */
.wf-ppc-success-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    font-size: 14px;
}
.wf-ppc-success-icon {
    width: 28px; height: 28px;
    background: #22c55e;
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700;
    flex-shrink: 0;
}
.wf-ppc-tx {
    font-size: 11px;
    color: #6b7280;
    margin-left: auto;
    font-family: monospace;
}

/* ── Hosted / Card Fields — Diseño moderno ───────────────────────────── */

.wf-hf-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    background: #ffffff;
    border: 1.5px solid #e8eaf0;
    border-radius: 16px;
    padding: 22px 20px 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

/* Cabecera con título y logos de tarjeta */
.wf-hf-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
}
.wf-hf-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    letter-spacing: .1px;
}
.wf-hf-card-icons {
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: .85;
}

.wf-hf-row {
    display: flex;
    gap: 10px;
}
.wf-hf-row .wf-hf-field-group { flex: 1; }

.wf-hf-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.wf-hf-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* Contenedor de los iframes de PayPal y del input nativo */
.wf-hf-field {
    height: 46px;
    border-radius: 10px;
    padding: 0;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color .18s, background .18s, box-shadow .18s;
    display: flex;
    align-items: center;
}
.wf-hf-field:focus-within,
.wf-hf-field.paypal-card-field-focused {
    border-color: #6366f1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,.13);
    outline: none;
}
.wf-hf-field.paypal-card-field-invalid {
    border-color: #ef4444;
    background: #fff7f7;
    box-shadow: 0 0 0 3px rgba(239,68,68,.09);
}

/* Input nativo (titular) dentro del contenedor .wf-hf-field */
.wf-hf-field--native {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #111827;
    font-family: inherit;
    outline: none;
    padding: 0;
    line-height: 1;
}
.wf-hf-field--native::placeholder { color: #9ca3af; }

/* Botón de pago */
.wf-hf-pay-btn {
    height: 50px;
    width: 100%;
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, background .15s;
    letter-spacing: .2px;
    box-shadow: 0 4px 14px rgba(0,80,160,.32);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 2px;
}
.wf-hf-pay-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 7px 20px rgba(0,80,160,.42);
}
.wf-hf-pay-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,80,160,.25);
}
.wf-hf-pay-btn:disabled {
    background: linear-gradient(135deg, #93c5fd 0%, #bfdbfe 100%);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Mensaje de error */
.wf-hf-error {
    font-size: 12px;
    color: #dc2626;
    padding: 9px 13px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.4;
}

/* Nota de seguridad */
.wf-hf-secure-note {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    letter-spacing: .1px;
}

/* ── Centrado botones PayPal / Tarjeta en escritorio ─────────────────────── */
/* En móvil (≤660px) ya ocupan el 100% gracias a tu CSS existente.           */
/* El :not(.wf-sub-customer-info) evita que afecte al bloque de datos.       */

@media (min-width: 661px) {
    .wf-ppc-buttons > div:not(.wf-sub-customer-info) {
        justify-content: center;
        max-width: 100% !important;
    }
    .wf-ppc-buttons > div:not(.wf-sub-customer-info) > div {
        width: 100% !important;
    }
}

/* ── Bloque datos del suscriptor (modo suscripción) ─────────────────────── */

.wf-sub-customer-info {
    background: #f0f9ff;
    border: 1.5px solid #bae6fd;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 14px;
}
.wf-sub-ci-title {
    font-size: 10px;
    font-weight: 700;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 8px;
    letter-spacing: .5px;
    text-transform: uppercase;
}
.wf-sub-ci-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    border-bottom: 1px solid #e0f2fe;
}
.wf-sub-ci-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.wf-sub-ci-label {
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}
.wf-sub-ci-value {
    color: #0f172a;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}
