/* ==========================================================================
   NexaWeb — Smart Contact Form & Lead Capture (3D Animated)
   ========================================================================== */

:root {
    --nx-sc-bg: rgba(14, 18, 42, 0.75);
    --nx-sc-border: rgba(255, 255, 255, 0.12);
    --nx-sc-cyan: #00e5ff;
    --nx-sc-purple: #6c5cff;
    --nx-sc-pink: #ff3d9a;
    --nx-sc-grad: linear-gradient(120deg, #6c5cff 0%, #00e5ff 50%, #ff3d9a 100%);
    --nx-sc-text: #ffffff;
    --nx-sc-muted: rgba(232, 234, 255, 0.7);
}

.nx-smart-form-shell {
    position: relative;
    border-radius: 28px;
    padding: 44px 40px;
    background: var(--nx-sc-bg);
    border: 1px solid var(--nx-sc-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    overflow: hidden;
    transform-style: preserve-3d;
}

/* Ambient Radial Glow */
.nx-smart-form-shell::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.nx-smart-form-shell::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108, 92, 255, 0.22) 0%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.nx-smart-form-content {
    position: relative;
    z-index: 2;
}

.nx-smart-form-header {
    margin-bottom: 28px;
}

.nx-smart-form-header h3 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
    line-height: 1.2;
}

.nx-smart-form-header p {
    color: var(--nx-sc-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
}

/* Form Fields */
.nx-smart-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nx-smart-group {
    position: relative;
}

.nx-smart-group label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Manrope', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.nx-smart-group label .req-dot {
    color: var(--nx-sc-cyan);
    font-size: 12px;
}

.nx-smart-group label .opt-badge {
    color: var(--nx-sc-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.nx-smart-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(7, 9, 25, 0.7);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.3);
}

.nx-smart-input-wrap .field-icon {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-sc-muted);
    font-size: 16px;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.nx-smart-input-wrap input,
.nx-smart-input-wrap select {
    width: 100%;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    padding: 16px 18px 16px 0;
    outline: none !important;
    box-shadow: none !important;
}

.nx-smart-input-wrap input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.nx-smart-input-wrap select option {
    background: #0d102a;
    color: #ffffff;
    padding: 10px;
}

/* Input Focus Glow */
.nx-smart-input-wrap:focus-within {
    border-color: var(--nx-sc-cyan);
    box-shadow: 0 0 25px rgba(0, 229, 255, 0.35), inset 0 2px 6px rgba(0, 0, 0, 0.3);
    background: rgba(10, 14, 38, 0.9);
}

.nx-smart-input-wrap:focus-within .field-icon {
    color: var(--nx-sc-cyan);
}

/* Validation states */
.nx-smart-group.is-valid .nx-smart-input-wrap {
    border-color: rgba(16, 185, 129, 0.6);
}

.nx-smart-group.has-error .nx-smart-input-wrap {
    border-color: #ef4444;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.nx-smart-error-msg {
    font-size: 12px;
    color: #f87171;
    margin-top: 6px;
    display: none;
}

.nx-smart-group.has-error .nx-smart-error-msg {
    display: block;
}

/* Consent Disclosure Box */
.nx-smart-consent-box {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.nx-smart-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    margin: 0;
}

.nx-smart-consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--nx-sc-cyan);
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
}

.nx-smart-consent-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--nx-sc-muted);
}

.nx-smart-consent-text strong {
    color: #ffffff;
}

/* Auto-save Status Indicator */
.nx-smart-save-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: rgba(0, 229, 255, 0.85);
    margin-top: 8px;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nx-smart-save-indicator.is-visible {
    opacity: 1;
}

.nx-smart-save-indicator .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--nx-sc-cyan);
    box-shadow: 0 0 10px var(--nx-sc-cyan);
}

/* 3D Primary Button */
.nx-smart-submit-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 36px;
    border-radius: 999px;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #ffffff !important;
    background: var(--nx-sc-grad);
    background-size: 200% auto;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 12px 36px rgba(108, 92, 255, 0.45);
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    animation: nxSmartGrad 4s linear infinite;
}

@keyframes nxSmartGrad {
    to { background-position: 200% center; }
}

.nx-smart-submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 18px 45px rgba(0, 229, 255, 0.55);
    border-color: rgba(0, 229, 255, 0.6);
}

.nx-smart-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.nx-smart-submit-btn .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: nxBtnSpin 0.8s linear infinite;
}

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

.nx-smart-submit-btn.is-loading .btn-spinner {
    display: inline-block;
}

.nx-smart-submit-btn.is-loading .btn-text,
.nx-smart-submit-btn.is-loading .btn-icon {
    display: none;
}

/* Security Trust Badges Strip */
.nx-smart-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    color: var(--nx-sc-muted);
    font-size: 12px;
}

.nx-smart-trust span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nx-smart-trust i {
    color: var(--nx-sc-cyan);
    font-size: 13px;
}

/* 3D Success Card Overlay */
.nx-smart-success-card {
    display: none;
    text-align: center;
    padding: 30px 10px;
    perspective: 800px;
}

.nx-smart-success-orb {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    border-radius: 50%;
    background: radial-gradient(circle, #00e5ff 0%, #10b981 100%);
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.6);
    display: grid;
    place-items: center;
    font-size: 36px;
    color: #070919;
    animation: nxSuccessPulse 2s infinite ease-in-out;
}

@keyframes nxSuccessPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 40px rgba(0, 229, 255, 0.5); }
    50% { transform: scale(1.08); box-shadow: 0 0 60px rgba(16, 185, 129, 0.8); }
}

.nx-smart-success-card h3 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 14px;
}

.nx-smart-success-card p {
    color: var(--nx-sc-muted);
    font-size: 16px;
    line-height: 1.7;
    max-width: 480px;
    margin: 0 auto 28px;
}

.nx-smart-success-card strong {
    color: #00e5ff;
}

@media (max-width: 767px) {
    .nx-smart-form-shell {
        padding: 32px 22px;
        border-radius: 22px;
    }
    .nx-smart-trust {
        flex-direction: column;
        gap: 8px;
    }
}
