/* AI Knowledge Base Pro - Advanced Chat Widget v2.0 - SCROLL-SAFE */

/* ==================== CORE WIDGET STRUCTURE ==================== */
.aikb-chat-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    background: #fff;
    position: relative;
}

/* ==================== HEADER ==================== */
.aikb-chat-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.aikb-chat-header h3 { 
    margin: 0; 
    font-size: 16px; 
    font-weight: 600; 
}

.aikb-chat-header-actions { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
}

.aikb-chat-header-actions select {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.aikb-chat-header-actions option { 
    color: #333; 
}

.aikb-chat-btn-new,
.aikb-kb-refresh-btn,
.aikb-doc-filter-toggle {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.aikb-chat-btn-new:hover,
.aikb-kb-refresh-btn:hover,
.aikb-doc-filter-toggle:hover { 
    background: rgba(255,255,255,0.3); 
}

.aikb-doc-filter-toggle {
    font-size: 16px;
    padding: 4px 10px;
}

.aikb-doc-filter-toggle {
    font-size: 12px;
    padding: 6px 12px;
    font-weight: 600;
}

/* Always visible filter status bar */
.aikb-doc-filter-panel-toggle {
    background: #eff6ff;
    border-bottom: 1px solid #93c5fd;
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
}

.aikb-doc-filter-panel-toggle:hover {
    background: #dbeafe;
}

.aikb-doc-count-badge-mini {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* ==================== DOCUMENT FILTER PANEL ==================== */
.aikb-doc-filter-panel {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 12px 16px;
}

.aikb-doc-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.aikb-doc-filter-header strong {
    font-size: 13px;
    color: #374151;
}

.aikb-doc-count-badge {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.aikb-doc-filter-options {
    margin-bottom: 10px;
}

.aikb-doc-filter-options label {
    display: block;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
}

.aikb-doc-filter-options input[type="radio"] {
    margin-right: 6px;
}

.aikb-doc-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
    margin-top: 8px;
    background: #fff;
}

.aikb-doc-list label {
    display: block;
    padding: 6px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    font-size: 12px;
    transition: background 0.15s;
}

.aikb-doc-list label:last-child {
    border-bottom: none;
}

.aikb-doc-list label:hover {
    background: #f9fafb;
}

.aikb-doc-list input[type="checkbox"] {
    margin-right: 6px;
}

.aikb-doc-list-loading {
    text-align: center;
    color: #6b7280;
    padding: 20px;
    font-size: 13px;
}

.aikb-doc-filter-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    justify-content: space-between;
}

.aikb-doc-select-all,
.aikb-doc-select-none {
    font-size: 12px;
    padding: 4px 10px;
    height: auto;
}

.aikb-doc-apply-filter {
    font-size: 12px;
    padding: 4px 16px;
    height: auto;
}

/* ==================== BODY LAYOUT ==================== */
.aikb-chat-body { 
    display: flex; 
    flex: 1; 
    min-height: 0;
    position: relative;
}

/* ==================== SIDEBAR ==================== */
.aikb-chat-sidebar {
    width: 220px;
    border-right: 1px solid #e5e7eb;
    overflow-y: auto;
    background: #f9fafb;
    flex-shrink: 0;
}

.aikb-chat-sidebar-header {
    padding: 12px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: #6b7280;
    border-bottom: 1px solid #e5e7eb;
}

.aikb-chat-history-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aikb-chat-history-item:hover { 
    background: #eff6ff; 
}

.aikb-chat-history-item.active { 
    background: #dbeafe;
    border-left: 3px solid #3b82f6;
}

.aikb-chat-history-item .title { 
    flex: 1; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

.aikb-chat-history-item .delete-chat {
    opacity: 0;
    cursor: pointer;
    color: #ef4444;
    font-size: 16px;
    padding: 0 4px;
}

.aikb-chat-history-item:hover .delete-chat { 
    opacity: 1; 
}

/* ==================== MAIN CHAT AREA ==================== */
.aikb-chat-main { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    min-width: 0;
    position: relative;
}

/* CRITICAL: Messages container - ZERO HIDING */
.aikb-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
    background: #fafbfc;
    min-height: 400px;
    position: relative;
}

/* CRITICAL: Messages - ALWAYS VISIBLE */
.aikb-msg {
    margin-bottom: 16px;
    display: flex !important;
    gap: 10px;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    /* NO animations, NO transforms, NO transitions that could hide */
}

.aikb-msg-user { 
    flex-direction: row-reverse; 
}

.aikb-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.aikb-msg-user .aikb-msg-avatar { 
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; 
}

.aikb-msg-assistant .aikb-msg-avatar { 
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff; 
}

.aikb-msg-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.6;
    font-size: 14px;
    word-break: break-word;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.aikb-msg-user .aikb-msg-bubble {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.aikb-msg-assistant .aikb-msg-bubble {
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #1f2937;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.aikb-msg-bubble img { 
    max-width: 200px; 
    border-radius: 8px; 
    margin: 8px 0;
    display: block;
}

/* Code blocks */
.aikb-msg-bubble pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 12px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 13px;
    margin: 8px 0;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    border-left: 4px solid #8b5cf6;
}

.aikb-msg-bubble code { 
    background: #f1f5f9;
    padding: 2px 6px; 
    border-radius: 4px; 
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    color: #e11d48;
}

.aikb-msg-bubble pre code { 
    background: transparent;
    padding: 0;
    color: #e2e8f0;
}

.aikb-msg-bubble strong { 
    font-weight: 600; 
}

.aikb-msg-bubble em { 
    font-style: italic; 
}

.aikb-msg-bubble a {
    color: #3b82f6;
    text-decoration: underline;
}

.aikb-msg-user .aikb-msg-bubble a {
    color: #fff;
}

/* ==================== SAVE TO KB BUTTON ==================== */
.aikb-msg-actions {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.aikb-msg:hover .aikb-msg-actions {
    opacity: 1;
}

.aikb-save-to-kb-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.aikb-save-to-kb-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.aikb-save-to-kb-btn:active {
    transform: translateY(0);
}

.aikb-save-to-kb-btn.saved {
    background: #6b7280;
    cursor: default;
}

.aikb-save-to-kb-btn.saved:hover {
    transform: none;
}

.aikb-save-to-kb-btn::before {
    content: '💾';
    font-size: 12px;
}

.aikb-save-to-kb-btn.saved::before {
    content: '✅';
}

/* Save to KB Modal */
.aikb-save-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.aikb-save-modal.active {
    display: flex;
}

.aikb-save-modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.aikb-save-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.aikb-save-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aikb-save-modal-header h3::before {
    content: '💾';
    font-size: 20px;
}

.aikb-save-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.aikb-save-modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.aikb-save-modal-body {
    margin-bottom: 20px;
}

.aikb-save-modal-field {
    margin-bottom: 16px;
}

.aikb-save-modal-field label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 13px;
}

.aikb-save-modal-field input,
.aikb-save-modal-field select,
.aikb-save-modal-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.aikb-save-modal-field textarea {
    resize: vertical;
    min-height: 80px;
}

.aikb-save-modal-field input:focus,
.aikb-save-modal-field select:focus,
.aikb-save-modal-field textarea:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.aikb-save-modal-preview {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-top: 8px;
}

.aikb-save-modal-preview-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.aikb-save-modal-preview-content {
    color: #374151;
    font-size: 13px;
    line-height: 1.5;
    max-height: 100px;
    overflow-y: auto;
}

.aikb-save-modal-footer {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.aikb-save-modal-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.aikb-save-modal-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.aikb-save-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.aikb-save-modal-btn-save {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.aikb-save-modal-btn-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.aikb-save-modal-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.aikb-save-modal-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
    color: #065f46;
    font-weight: 600;
    display: none;
}

.aikb-save-modal-success.active {
    display: block;
}

.aikb-save-modal-success::before {
    content: '✅ ';
}

/* ==================== WELCOME MESSAGE ==================== */
.aikb-welcome {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.aikb-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.aikb-welcome h4 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f2937;
}

.aikb-welcome p {
    margin: 0;
    font-size: 14px;
}

/* ==================== TYPING INDICATOR ==================== */
.aikb-typing {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.aikb-typing span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #8b5cf6;
    display: inline-block;
    animation: aikb-typing-bounce 1.4s infinite ease-in-out;
}

.aikb-typing span:nth-child(1) { animation-delay: -0.32s; }
.aikb-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes aikb-typing-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* ==================== INPUT AREA ==================== */
.aikb-chat-input-wrap {
    padding: 16px 20px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.aikb-chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.aikb-chat-input-container {
    flex: 1;
    position: relative;
}

.aikb-chat-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    line-height: 1.5;
}

.aikb-chat-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.aikb-chat-img-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.aikb-chat-img-btn:hover {
    background: #f3f4f6;
    border-color: #6366f1;
}

.aikb-chat-img-input {
    display: none;
}

.aikb-chat-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    height: 40px;
}

.aikb-chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.aikb-chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Image preview */
.aikb-image-preview {
    display: none;
    padding: 8px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 8px;
    position: relative;
}

.aikb-image-preview.active {
    display: block;
}

.aikb-image-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 4px;
    display: block;
}

.aikb-image-preview .remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .aikb-chat-sidebar { 
        display: none; 
    }
    
    .aikb-msg-bubble { 
        max-width: 90%; 
    }
    
    .aikb-chat-header-actions select {
        max-width: 150px;
    }
}

/* ==================== SCROLLBAR STYLING ==================== */
.aikb-chat-messages::-webkit-scrollbar,
.aikb-chat-sidebar::-webkit-scrollbar {
    width: 6px;
}

.aikb-chat-messages::-webkit-scrollbar-track,
.aikb-chat-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.aikb-chat-messages::-webkit-scrollbar-thumb,
.aikb-chat-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.aikb-chat-messages::-webkit-scrollbar-thumb:hover,
.aikb-chat-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ==================== UTILITY CLASSES ==================== */
.aikb-kb-new-badge {
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    font-weight: 700;
}

/* ==================== SEARCH WIDGET ==================== */
.aikb-search-widget {
    max-width: 600px;
    margin: 20px auto;
}

.aikb-search-input-wrap {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.aikb-search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.aikb-search-btn {
    padding: 10px 20px;
    background: #6366f1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.aikb-search-results {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
}

.aikb-search-result-item {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.aikb-search-result-item:last-child {
    border-bottom: none;
}

.aikb-search-result-title {
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
}

.aikb-search-result-content {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* ==================== CRITICAL: ABSOLUTE NO-HIDE ENFORCEMENT ==================== */
/* These rules override ANY attempt to hide messages */
.aikb-msg,
.aikb-msg *,
.aikb-msg-bubble,
.aikb-msg-bubble * {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force all child elements to be visible */
.aikb-chat-messages .aikb-msg {
    display: flex !important;
}

.aikb-chat-messages .aikb-msg-bubble {
    display: block !important;
}

/* Remove ANY transforms that could hide content */
.aikb-msg {
    transform: none !important;
    -webkit-transform: none !important;
}

/* Prevent backface hiding */
.aikb-msg,
.aikb-msg * {
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
}

/* ── AI Knowledge Base Pro v3 — Chat Widget CSS ── */

/* Sources */
.aikb-sources-wrap { margin-top: 8px; font-size: 11px; color: #6b7280; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.aikb-sources-label { font-weight: 600; }
.aikb-source-chip { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; padding: 2px 8px; border-radius: 12px; font-size: 11px; }

/* Confidence */
.aikb-confidence { margin-top: 6px; font-size: 11px; padding: 3px 8px; border-radius: 10px; display: inline-block; }
.aikb-confidence-high { background: #dcfce7; color: #15803d; }
.aikb-confidence-medium { background: #fef9c3; color: #854d0e; }
.aikb-confidence-low { background: #fee2e2; color: #b91c1c; }

/* Suggested questions */
.aikb-suggested-wrap { margin-top: 10px; padding: 10px 12px; background: #f8fafc; border-radius: 10px; border: 1px solid #e2e8f0; }
.aikb-suggested-label { font-size: 12px; color: #64748b; margin-bottom: 6px; font-weight: 600; }
.aikb-suggested-btn { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 7px 12px; margin: 4px 0; font-size: 13px; color: #4338ca; cursor: pointer; transition: all .2s; }
.aikb-suggested-btn:hover { background: #eef2ff; border-color: #818cf8; }

/* Rating bar */
.aikb-rating-bar { margin-top: 8px; display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.aikb-rating-label { font-size: 12px; color: #9ca3af; }
.aikb-rate-btn { background: none; border: 1px solid #e5e7eb; border-radius: 6px; padding: 3px 8px; cursor: pointer; font-size: 14px; transition: all .2s; }
.aikb-rate-btn:hover { background: #f3f4f6; border-color: #9ca3af; }
.aikb-rate-btn.aikb-rate-selected { background: #f0fdf4; border-color: #86efac; }
.aikb-rate-btn:disabled { opacity: .5; cursor: default; }
.aikb-rating-thanks { font-size: 12px; color: #16a34a; }

/* Cache badge */
.aikb-cache-badge { font-size: 10px; background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; padding: 2px 7px; border-radius: 8px; margin-top: 4px; display: inline-block; }

/* Lead capture overlay */
.aikb-lead-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 1000; display: flex; align-items: center; justify-content: center; border-radius: inherit; }
.aikb-lead-modal { background: #fff; border-radius: 16px; padding: 28px; max-width: 360px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.aikb-lead-header h3 { margin: 0 0 6px; font-size: 18px; color: #1e293b; }
.aikb-lead-header p { margin: 0 0 16px; color: #64748b; font-size: 14px; }
.aikb-lead-input { display: block; width: 100%; box-sizing: border-box; padding: 10px 12px; margin-bottom: 10px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; }
.aikb-lead-input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.aikb-lead-submit { width: 100%; padding: 12px; background: linear-gradient(135deg,#6366f1,#8b5cf6); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; cursor: pointer; transition: opacity .2s; }
.aikb-lead-submit:hover { opacity: .9; }
.aikb-lead-skip { text-align: center; margin: 10px 0 0; font-size: 12px; }
.aikb-lead-skip-link { color: #94a3b8; text-decoration: none; }
.aikb-lead-skip-link:hover { color: #64748b; }
