/* ============================================
   WhatsApp Bot Interface Styles
   IntellaPersona - Intellecta Solutions
   ============================================ */

:root {
    /* WhatsApp Colors */
    --whatsapp-green: #25D366;
    --whatsapp-dark-green: #128C7E;
    --whatsapp-light-green: #DCF8C6;
    --whatsapp-blue: #34B7F1;
    --whatsapp-teal: #075E54;
    --whatsapp-gray: #E5E5E5;
    --whatsapp-dark-gray: #303030;
}

/* ============================================
   WHATSAPP SECTION
   ============================================ */
.whatsapp-section {
    min-height: 100vh;
    padding: 7rem 1rem 3rem;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a1f3a 100%);
}

.whatsapp-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Hero Section */
.whatsapp-hero {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-icon {
    font-size: 5rem;
    color: var(--whatsapp-green);
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.whatsapp-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
}

/* Connection Steps */
.connection-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.step-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.step-card:hover {
    transform: translateY(-4px);
    border-color: var(--whatsapp-green);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.2);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Main Content Area */
.whatsapp-main {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

/* WhatsApp Direct Link Section */
.whatsapp-link-section {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.link-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.link-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.link-header i {
    font-size: 3rem;
    color: var(--whatsapp-green);
    animation: pulse 2s ease-in-out infinite;
}

.link-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.link-content {
    margin-bottom: 2rem;
}

.link-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.whatsapp-start-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 3rem;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark-green) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 1.25rem;
    font-weight: 700;
    transition: all var(--transition-base);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    margin: 2rem 0;
}

.whatsapp-start-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-start-button:active {
    transform: translateY(-2px) scale(1.02);
}

.whatsapp-start-button i:first-child {
    font-size: 1.5rem;
}

.whatsapp-start-button i:last-child {
    font-size: 1rem;
    transition: transform var(--transition-fast);
}

.whatsapp-start-button:hover i:last-child {
    transform: translateX(5px);
}

.bot-status-info {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(37, 211, 102, 0.1);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(37, 211, 102, 0.2);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-full);
    margin-bottom: 1rem;
}

.status-badge.online .status-dot {
    width: 10px;
    height: 10px;
    background: var(--whatsapp-green);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-badge span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

.status-note {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
}

.status-note strong {
    color: var(--whatsapp-green);
    font-weight: 700;
}

.quick-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.quick-links h3 {
    font-size: 1.125rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.qr-mini-section {
    text-align: center;
}

.qr-mini-section p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.qr-mini {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: var(--radius-md);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--bg-secondary);
    font-weight: 600;
}

.qr-mini::before {
    content: 'QR Code';
}

/* QR Code Section - REMOVED, keeping for compatibility */
.qr-section {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.qr-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.qr-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.qr-header i {
    font-size: 2rem;
    color: var(--whatsapp-green);
}

.qr-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.qr-code-container {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    margin-bottom: 1.5rem;
    position: relative;
}

.qr-placeholder {
    text-align: center;
    color: var(--bg-secondary);
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--whatsapp-gray);
    border-top-color: var(--whatsapp-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.qr-placeholder p {
    font-size: 0.9rem;
    font-weight: 500;
}

.connection-status {
    text-align: center;
    padding: 1rem;
    background: rgba(37, 211, 102, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.waiting {
    background: var(--warning);
}

.status-dot.connected {
    background: var(--whatsapp-green);
}

.status-dot.disconnected {
    background: var(--error);
}

.status-text {
    font-weight: 600;
    color: var(--text-primary);
}

.qr-instructions {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

.qr-instructions h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qr-instructions h3 i {
    color: var(--whatsapp-blue);
}

.qr-instructions ol {
    margin-left: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.qr-instructions li {
    margin-bottom: 0.5rem;
}

.qr-instructions strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Chat Demo Section */
.chat-demo-section {
    display: flex;
    flex-direction: column;
}

.chat-demo-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    height: 600px;
}

.chat-demo-header {
    background: var(--whatsapp-teal);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contact-details h3 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.online-status {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.online-status i {
    font-size: 0.5rem;
    color: var(--whatsapp-light-green);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: opacity var(--transition-fast);
}

.icon-btn:hover {
    opacity: 0.7;
}

.chat-demo-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%);
    background-image: 
        linear-gradient(135deg, #0f172a 0%, #1a1f3a 100%),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255,255,255,.02) 10px, rgba(255,255,255,.02) 20px);
}

.chat-demo-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-demo-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    margin-bottom: 1rem;
    animation: messageSlideIn 0.3s ease-out;
}

.chat-message.received {
    justify-content: flex-start;
}

.chat-message.sent {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 70%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    position: relative;
}

.chat-message.received .message-bubble {
    background: rgba(51, 65, 85, 0.8);
    border-bottom-left-radius: 2px;
}

.chat-message.sent .message-bubble {
    background: linear-gradient(135deg, var(--whatsapp-dark-green) 0%, var(--whatsapp-teal) 100%);
    border-bottom-right-radius: 2px;
}

.message-bubble p {
    color: white;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.message-bubble ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-bubble li {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0.25rem;
}

.message-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    display: block;
    text-align: right;
}

.chat-demo-input {
    background: rgba(15, 23, 42, 0.8);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-demo-input input {
    flex: 1;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.chat-demo-input input::placeholder {
    color: var(--text-muted);
}

.chat-demo-input input:focus {
    outline: none;
    border-color: var(--whatsapp-green);
}

.send-btn {
    background: var(--whatsapp-green);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.send-btn:hover {
    background: var(--whatsapp-dark-green);
    transform: scale(1.05);
}

/* Features Grid */
.whatsapp-features {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

.features-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    transition: all var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--whatsapp-green);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.15);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark-green) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.2);
    border-radius: var(--radius-xl);
    animation: fadeInUp 0.8s ease-out 0.8s backwards;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), 0 0 25px rgba(99, 102, 241, 0.4);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .whatsapp-main {
        grid-template-columns: 1fr;
    }
    
    .link-card {
        padding: 2rem;
    }
    
    .chat-demo-card {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .whatsapp-section {
        padding: 6rem 1rem 2rem;
    }
    
    .connection-steps {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .step-card {
        padding: 1rem;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .link-card {
        padding: 1.5rem;
    }
    
    .link-header h2 {
        font-size: 1.5rem;
    }
    
    .link-description {
        font-size: 1rem;
    }
    
    .whatsapp-start-button {
        padding: 1rem 2rem;
        font-size: 1.125rem;
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-demo-card {
        height: 450px;
    }
    
    .message-bubble {
        max-width: 85%;
    }
    
    .cta-section {
        padding: 2rem 1rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-icon {
        font-size: 3.5rem;
    }
    
    .whatsapp-title {
        font-size: 1.75rem;
    }
    
    .whatsapp-subtitle {
        font-size: 0.95rem;
    }
    
    .qr-card {
        padding: 1.5rem;
    }
    
    .qr-code-container {
        padding: 1rem;
        min-height: 250px;
    }
    
    .chat-demo-card {
        height: 400px;
    }
    
    .contact-details h3 {
        font-size: 1rem;
    }
    
    .message-bubble {
        max-width: 90%;
        padding: 0.6rem 0.8rem;
    }
    
    .message-bubble p {
        font-size: 0.9rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
