/* ==========================================
   JCFlow — WhatsApp Redirect Bridge (p/whatsapp/dom/index.css)
   ========================================== */

.whatsapp-page-wrapper {
    padding-top: calc(var(--header-height, 76px) + clamp(32px, 6vh, 64px));
    padding-bottom: clamp(60px, 10vh, 120px);
    position: relative;
    overflow: hidden;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-container {
    max-width: 680px;
    margin: 0 auto;
    width: 100%;
}

.whatsapp-glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: clamp(24px, 5vw, 44px);
    box-shadow: var(--shadow-xl), 0 0 50px rgba(37, 211, 102, 0.08);
    position: relative;
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

[data-theme="dark"] .whatsapp-glass-card {
    background: rgba(17, 24, 39, 0.85);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 60px rgba(37, 211, 102, 0.12);
}

/* Barra superior luminosa */
.whatsapp-glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #25D366 0%, #4f46e5 50%, #25D366 100%);
    background-size: 200% 100%;
    border-radius: 28px 28px 0 0;
    animation: waTopShimmer 3s ease infinite;
}

@keyframes waTopShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Badge superior */
.wa-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 999px;
    color: #10b981;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 20px;
}

[data-theme="dark"] .wa-badge {
    color: #4ade80;
}

.wa-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 10px #22c55e;
    animation: waPulse 1.8s infinite;
}

@keyframes waPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* Logo animado */
.wa-logo-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 10px auto 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-logo {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.45);
    z-index: 2;
    transition: transform 0.3s ease;
}

.wa-logo svg {
    width: 42px;
    height: 42px;
    fill: #ffffff;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.wa-pulse-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.5);
    animation: waRingPulse 2.4s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.wa-pulse-ring-delay {
    inset: -14px;
    animation-delay: 1.2s;
    border-color: rgba(37, 211, 102, 0.3);
}

@keyframes waRingPulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    70% { transform: scale(1.25); opacity: 0; }
    100% { transform: scale(1.25); opacity: 0; }
}

/* Textos */
.wa-title {
    font-size: clamp(1.4rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1.25;
}

.wa-desc {
    font-size: 0.96rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto 24px;
}

/* Loader de redirección */
.wa-loader {
    width: 100%;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 24px;
    position: relative;
}

.wa-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #25D366, #4f46e5);
    border-radius: 999px;
    transition: width 1.4s linear;
}

/* Tarjeta de teléfono */
.wa-phone-card {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.wa-phone-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wa-phone-info {
    display: flex;
    flex-direction: column;
}

.wa-phone-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.wa-phone-number {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

/* Formulario de captura de correo */
.wa-lead-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    margin-bottom: 24px;
    text-align: left;
}

.wa-lead-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.wa-lead-input-group {
    display: flex;
    gap: 8px;
}

.wa-lead-input {
    flex: 1;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wa-lead-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.wa-lead-btn {
    min-width: 46px;
    min-height: 44px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.wa-lead-btn:hover {
    background: var(--accent-hover);
}

.wa-lead-btn--success {
    background: #10b981 !important;
}

.wa-lead-hint {
    display: block;
    font-size: 0.78rem;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.wa-lead-ok {
    display: inline-block;
    color: #10b981;
    font-weight: 600;
    font-size: 0.86rem;
    margin-left: 8px;
}

/* Acciones */
.wa-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 16px;
}

.wa-btn-main {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%) !important;
    border: none !important;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4) !important;
    gap: 8px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wa-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(37, 211, 102, 0.55) !important;
}

.wa-btn-back {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wa-help {
    font-size: 0.84rem;
    color: var(--text-tertiary);
    margin: 0 0 28px;
}

.wa-help a {
    color: var(--accent);
    text-decoration: underline;
}

/* Testimonios */
.wa-testimonials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    text-align: left;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.wa-test-item {
    display: flex;
    gap: 12px;
    background: var(--bg-secondary);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.wa-test-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wa-test-quote {
    font-size: 0.82rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin: 0 0 6px 0;
    font-style: italic;
}

.wa-test-author {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-tertiary);
    display: block;
}

@media (max-width: 640px) {
    .wa-testimonials {
        grid-template-columns: 1fr;
    }

    .wa-actions {
        flex-direction: column;
    }

    .wa-actions .btn {
        width: 100%;
    }
}
