/* Vinyl Sharp - Completely Isolated Chat Interface */
/* No inheritance from video-section or any other site styles */

/* Isolated Chat Container - Creates complete separation from site styles */
.chat-section-isolated {
    /* Reset all inherited styles */
    all: initial;
    font-family: 'Futura', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Container setup */
    display: block;
    width: 100%;
    padding: 80px 20px;
    background: transparent;
    box-sizing: border-box;
}

.chat-section-isolated * {
    /* Reset inheritance for all children */
    color: #1a1a1a;
    text-shadow: none;
    background: initial;
    border: initial;
    margin: initial;
    padding: initial;
    box-sizing: border-box;
}

.chat-container-isolated {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
}

/* Clean Header Styling - Isolated from site styles */
.chat-header-isolated {
    text-align: center;
    margin-bottom: 48px;
}

.chat-header-isolated h2 {
    font-family: 'Bauhaus', 'Futura', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 20px 0;
    padding: 0 0 12px 0;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
    border-bottom: 3px solid #dc2626;
    display: inline-block;
}

.chat-header-isolated p {
    font-size: 1.2rem;
    color: white;
    margin: 0 auto;
    padding: 0;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    max-width: 500px;
}

/* Clean White Chat Card - Independent Design */
.chat-card-isolated {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    height: 600px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

/* Clean Header Bar */
.chat-header-bar {
    background: #f8fafc;
    padding: 24px 28px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    position: relative;
}

.chat-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3b82f6;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid #e2e8f0;
    flex-shrink: 0;
}

.chat-avatar img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 50%;
}

.chat-avatar::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    border: 3px solid #f8fafc;
}

.chat-assistant-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    padding: 0;
    font-family: 'Bauhaus', 'Futura', sans-serif;
    text-shadow: none;
}

.chat-assistant-info p {
    font-size: 0.9rem;
    color: #10b981;
    margin: 0;
    padding: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    text-shadow: none;
}

.chat-assistant-info p::before {
    content: "●";
    margin-right: 6px;
}

/* Clean Messages Area */
.chat-messages-area {
    flex: 1;
    padding: 32px 28px;
    overflow-y: auto;
    background: #ffffff;
    position: relative;
}

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

.chat-messages-area::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 3px;
}

.chat-messages-area::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.chat-messages-area::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Clean Welcome Card */
.welcome-card {
    text-align: center;
    padding: 32px 24px;
    color: #1a1a1a;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
}

.welcome-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    padding: 0;
    font-family: 'Bauhaus', 'Futura', sans-serif;
    text-shadow: none;
    line-height: 1.3;
}

.welcome-card p {
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #1a1a1a;
    text-shadow: none;
}

/* Clean Quick Replies */
.quick-replies-section {
    padding: 20px 28px 24px;
    background: #ffffff;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.quick-reply-button {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a1a1a;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Futura', sans-serif;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    text-shadow: none;
    outline: none;
}

.quick-reply-button:hover {
    background: #e2e8f0;
    color: #1a1a1a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.quick-reply-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Clean Chat Input */
.chat-input-section {
    padding: 24px 28px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    position: relative;
}

.chat-input-container {
    display: flex;
    align-items: flex-end;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 20px 12px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.chat-input-container:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1), 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.chat-input-field {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 0;
    font-size: 1rem;
    outline: none;
    resize: none;
    font-family: 'Futura', sans-serif;
    max-height: 120px;
    min-height: 24px;
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: 400;
}

.chat-input-field::placeholder {
    color: #9ca3af;
    font-style: italic;
}

.chat-send-button {
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 4px -1px rgba(59, 130, 246, 0.3);
    outline: none;
}

.chat-send-button:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.chat-send-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.chat-send-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: #d1d5db;
    box-shadow: none;
}

.chat-send-button i {
    font-size: 16px;
    margin-left: 2px;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.typing-dots {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    margin-left: 48px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #6b7280;
    border-radius: 50%;
    margin: 0 3px;
    animation: typing 1.6s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.3s; }
.typing-dots span:nth-child(3) { animation-delay: 0.6s; }

@keyframes typing {
    0%, 70%, 100% { 
        transform: translateY(0) scale(1); 
        opacity: 0.5; 
    }
    35% { 
        transform: translateY(-6px) scale(1.1); 
        opacity: 1; 
    }
}

/* Message Bubbles */
.chat-message {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    animation: messageSlide 0.3s ease;
}

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

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

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    border-radius: 12px;
    font-family: 'Futura', sans-serif;
}

.chat-message.bot .message-bubble {
    background: #f8fafc;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
    border-radius: 12px 12px 12px 4px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-bubble {
    background: #3b82f6;
    color: white;
    border-radius: 12px 12px 4px 12px;
    box-shadow: 0 2px 8px -2px rgba(59, 130, 246, 0.3);
}

.bot-avatar {
    width: 32px;
    height: 32px;
    margin-right: 12px;
    margin-top: 4px;
    border-radius: 50%;
    background: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid #e2e8f0;
}

.bot-avatar img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
}

/* Error Messages */
.error-message {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    margin: 16px 0;
    text-align: center;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-section-isolated {
        padding: 60px 16px;
    }
    
    .chat-header-isolated h2 {
        font-size: 2.25rem;
    }
    
    .chat-header-isolated p {
        font-size: 1.1rem;
    }
    
    .chat-card-isolated {
        height: 550px;
        border-radius: 12px;
    }
    
    .chat-header-bar {
        padding: 20px 24px;
    }
    
    .chat-messages-area {
        padding: 24px 20px;
    }
    
    .chat-input-section {
        padding: 20px 24px;
    }
    
    .quick-replies-section {
        padding: 18px 20px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .chat-section-isolated {
        padding: 50px 12px;
    }
    
    .chat-header-isolated h2 {
        font-size: 1.9rem;
    }
    
    .chat-card-isolated {
        height: 500px;
    }
    
    .chat-header-bar {
        padding: 16px 20px;
    }
    
    .chat-avatar {
        width: 44px;
        height: 44px;
    }
    
    .chat-avatar img {
        width: 32px;
        height: 32px;
    }
    
    .message-bubble {
        max-width: 88%;
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}