/* ==========================================================================
   NexaWeb — 3D Floating Action Dock & Holographic Lead Capture Modal
   ========================================================================== */

:root {
    --nx-primary-glow: #4f46e5;
    --nx-cyan-glow: #06b6d4;
    --nx-emerald-glow: #10b981;
    --nx-dark-glass: rgba(13, 17, 30, 0.85);
    --nx-border-glass: rgba(255, 255, 255, 0.12);
}

/* -------------------------------------------------------------
   1. 3D Floating Action Dock (Bottom Right & Left)
   ------------------------------------------------------------- */
.nexa-floating-dock {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: auto;
    perspective: 1000px;
}

/* 3D Callback Pill Button */
.nexa-floating-callback-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 50%, #1e1b4b 100%);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 
        0 14px 35px -6px rgba(79, 70, 229, 0.4),
        0 0 20px rgba(99, 102, 241, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    cursor: pointer;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Ambient Animated Sheen */
.nexa-floating-callback-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.5), transparent);
    z-index: 0;
    opacity: 0;
    transform: translateX(-100%);
    transition: transform 0.6s ease, opacity 0.3s ease;
}

.nexa-floating-callback-btn:hover::before {
    opacity: 1;
    transform: translateX(100%);
}

.nexa-floating-callback-btn:hover {
    transform: translateY(-4px) scale(1.03) rotateX(4deg);
    border-color: rgba(6, 182, 212, 0.75);
    box-shadow: 
        0 20px 45px -8px rgba(79, 70, 229, 0.6),
        0 0 30px rgba(6, 182, 212, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.nexa-floating-callback-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* 3D Holographic Icon Sphere */
.nexa-callback-icon-sphere {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.5);
    z-index: 1;
}

.nexa-callback-icon-sphere i {
    animation: nexa-phone-ring 3.5s infinite ease-in-out;
}

@keyframes nexa-phone-ring {
    0%, 80%, 100% { transform: rotate(0deg) scale(1); }
    82% { transform: rotate(-12deg) scale(1.1); }
    84% { transform: rotate(12deg) scale(1.1); }
    86% { transform: rotate(-8deg) scale(1.1); }
    88% { transform: rotate(8deg) scale(1.1); }
    90% { transform: rotate(0deg) scale(1); }
}

/* Pulsing Online Radar Dot */
.nexa-callback-beacon {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #0f172a;
}

.nexa-callback-beacon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: #10b981;
    opacity: 0.7;
    animation: nexa-beacon-pulse 1.8s infinite;
}

@keyframes nexa-beacon-pulse {
    0% { transform: scale(0.8); opacity: 0.9; }
    100% { transform: scale(2.2); opacity: 0; }
}

/* Text Content in Pill */
.nexa-callback-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.nexa-callback-text .title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nexa-callback-text .title .flash-tag {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.nexa-callback-text .sub {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
}

/* -------------------------------------------------------------
   2. Floating 3D WhatsApp Button
   ------------------------------------------------------------- */
.nexa-floating-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-decoration: none !important;
    box-shadow: 
        0 14px 30px rgba(18, 140, 126, 0.45),
        0 0 20px rgba(37, 211, 102, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    perspective: 1000px;
}

/* Continuous Pulse Ring */
.nexa-floating-whatsapp-btn::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid #25d366;
    opacity: 0.6;
    animation: nexa-wa-pulse 2s infinite ease-out;
}

@keyframes nexa-wa-pulse {
    0% { transform: scale(0.9); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

.nexa-floating-whatsapp-btn:hover {
    transform: translateY(-4px) scale(1.08) rotate(6deg);
    box-shadow: 
        0 20px 40px rgba(18, 140, 126, 0.6),
        0 0 35px rgba(37, 211, 102, 0.5);
}

/* Tooltip Badge for WhatsApp */
.nexa-wa-tooltip {
    position: absolute;
    left: 70px;
    background: rgba(15, 23, 42, 0.95);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    border: 1px solid rgba(37, 211, 102, 0.35);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: all 0.25s ease;
}

.nexa-floating-whatsapp-btn:hover .nexa-wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* -------------------------------------------------------------
   3. 3D Holographic Lead Capture Modal
   ------------------------------------------------------------- */
.nexa-floating-modal {
    position: fixed;
    inset: 0;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    perspective: 1200px;
}

.nexa-floating-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modal Backdrop with Glass Blur */
.nexa-floating-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 8, 20, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1;
}

/* 3D Dialog Container - Compact Single-View Fit */
.nexa-floating-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 490px;
    max-height: calc(100vh - 40px);
    overflow: hidden !important;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(20, 27, 45, 0.98) 0%, rgba(10, 14, 26, 0.99) 100%);
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 
        0 25px 60px -15px rgba(0, 0, 0, 0.85),
        0 0 50px rgba(79, 70, 229, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    padding: 22px 28px 20px;
    transform-style: preserve-3d;
    transform: scale(0.92) translateY(20px) rotateX(6deg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.nexa-floating-modal-dialog::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.nexa-floating-modal.is-active .nexa-floating-modal-dialog {
    transform: scale(1) translateY(0) rotateX(0deg);
}

/* Cyber Accent Top Glow Line */
.nexa-floating-modal-dialog::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #06b6d4, #4f46e5, transparent);
    border-radius: 2px;
}

/* Close Button with 3D Float */
.nexa-floating-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
}

.nexa-floating-modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    transform: rotate(90deg) scale(1.1);
}

/* Streamlined Modal Header */
.nexa-floating-modal-header {
    text-align: center;
    margin-bottom: 14px;
}

.nexa-floating-modal-header h3 {
    font-size: 21px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.nexa-floating-modal-header h3 span {
    background: linear-gradient(135deg, #06b6d4 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nexa-floating-modal-header p.subtitle {
    font-size: 12px;
    color: #94a3b8;
    margin: 0 auto;
    max-width: 400px;
    line-height: 1.35;
}

/* Compact Nested Smart Contact Form inside Modal */
.nexa-floating-modal .nx-smart-form-shell {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.nexa-floating-modal .nx-smart-form-header {
    display: none !important;
}

.nexa-floating-modal .nx-smart-fields {
    gap: 10px !important;
}

.nexa-floating-modal .nx-smart-group {
    margin-bottom: 0 !important;
}

.nexa-floating-modal .nx-smart-group label {
    font-size: 12px !important;
    margin-bottom: 3px !important;
}

.nexa-floating-modal .nx-smart-input-wrap {
    border-radius: 10px !important;
}

.nexa-floating-modal .nx-smart-input-wrap input,
.nexa-floating-modal .nx-smart-input-wrap select {
    padding: 9px 12px 9px 38px !important;
    font-size: 13.5px !important;
}

.nexa-floating-modal .nx-smart-input-wrap .field-icon {
    width: 38px !important;
    font-size: 13px !important;
}

.nexa-floating-modal .nx-smart-consent-box {
    margin: 4px 0 2px !important;
    padding: 2px 0 !important;
}

.nexa-floating-modal .nx-smart-consent-text {
    font-size: 11px !important;
    line-height: 1.35 !important;
}

.nexa-floating-modal .nx-smart-submit-btn {
    padding: 11px 18px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    margin-top: 4px !important;
}

.nexa-floating-modal .nx-smart-trust {
    display: none !important;
}

.nexa-floating-modal .nx-smart-save-indicator {
    margin: 2px 0 0 !important;
    font-size: 10.5px !important;
    line-height: 1.2 !important;
}

/* -------------------------------------------------------------
   4. Mobile Responsive Optimization
   ------------------------------------------------------------- */
@media (max-width: 767px) {
    .nexa-floating-dock {
        right: 14px;
        bottom: 14px;
    }

    .nexa-floating-whatsapp-btn {
        left: 14px;
        bottom: 14px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .nexa-floating-callback-btn {
        padding: 8px 16px 8px 10px;
    }

    .nexa-callback-icon-sphere {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .nexa-callback-text .title {
        font-size: 12px;
    }

    .nexa-callback-text .sub {
        display: none;
    }

    .nexa-floating-modal-dialog {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .nexa-floating-modal-header h3 {
        font-size: 22px;
    }
}
