/* ----------------------------------------------------------------------
   WTS TECHX - AI SMART LEAD CAPTURE & POPUP ENGINE STYLES
---------------------------------------------------------------------- */

.wts-ai-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999990;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.wts-ai-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Wrapper (Desktop Floating Card, Mobile Bottom Sheet) */
.wts-ai-modal {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0,0,0,0.05);
    z-index: 999999;
    transform: translateY(40px) scale(0.96);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
    font-family: var(--font-primary, system-ui, sans-serif);
}

.wts-ai-modal.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Modal Header */
.wts-ai-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 20px 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wts-ai-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wts-ai-avatar {
    width: 38px;
    height: 38px;
    background: var(--color-wts-accent, #D90429);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(217, 4, 41, 0.4);
}

.wts-ai-title {
    font-family: var(--font-heading, sans-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.wts-ai-subtitle {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

.wts-ai-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #cbd5e1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.wts-ai-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Progress Indicator Bar */
.wts-ai-progress-bar {
    height: 3px;
    background: #e2e8f0;
    width: 100%;
}

.wts-ai-progress-fill {
    height: 100%;
    background: var(--color-wts-accent, #D90429);
    width: 0%;
    transition: width 0.3s ease;
}

/* Modal Body & Steps */
.wts-ai-body {
    padding: 24px;
    max-height: 75vh;
    overflow-y: auto;
}

.wts-ai-step {
    display: none;
    animation: wtsAiFadeIn 0.3s ease forwards;
}

.wts-ai-step.active {
    display: block;
}

@keyframes wtsAiFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wts-ai-question {
    font-family: var(--font-heading, sans-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.wts-ai-desc {
    font-size: 0.88rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Input Fields & Form Controls */
.wts-ai-input-group {
    margin-bottom: 20px;
}

.wts-ai-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.98rem;
    color: #0f172a;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.wts-ai-input:focus {
    border-color: var(--color-wts-accent, #D90429);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.12);
}

/* Options Grid & Pills */
.wts-ai-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.wts-ai-option-btn {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wts-ai-option-btn:hover,
.wts-ai-option-btn.selected {
    border-color: var(--color-wts-accent, #D90429);
    background: #fff5f5;
    color: var(--color-wts-accent, #D90429);
}

/* Primary Action Buttons */
.wts-ai-btn {
    width: 100%;
    padding: 14px;
    background: var(--color-wts-accent, #D90429);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-heading, sans-serif);
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wts-ai-btn:hover {
    background: #b3001b;
}

.wts-ai-btn:active {
    transform: scale(0.98);
}

.wts-ai-btn-secondary {
    background: transparent;
    color: #64748b;
    border: 1.5px solid #cbd5e1;
    margin-top: 10px;
}

.wts-ai-btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Success Screen */
.wts-ai-success {
    text-align: center;
    padding: 20px 10px;
}

.wts-ai-success-icon {
    width: 54px;
    height: 54px;
    background: #dcfce7;
    color: #16a34a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px auto;
}

/* Mobile Responsive Bottom Sheet Override */
@media (max-width: 640px) {
    .wts-ai-modal {
        bottom: 0;
        right: 0;
        left: 0;
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
    }

    .wts-ai-modal.active {
        transform: translateY(0);
    }

    .wts-ai-options-grid {
        grid-template-columns: 1fr;
    }
}
