/**
 * AI Support Chat Widget Styles
 * Professional chat interface for StormHelpLine.com
 */

/* Chat Toggle Button */
#ai-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 123, 255, 0.3);
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 14px;
    max-width: 180px;
    min-width: 160px;
    backdrop-filter: blur(10px);
}

/* Dark Mode Toggle Button - Holographic */
[data-theme="dark"] #ai-chat-toggle {
    background: linear-gradient(135deg, #00d4ff, #8a2be2);
    border: 2px solid #00d4ff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.6),
                0 0 60px rgba(138, 43, 226, 0.4);
    color: #0a0e1a;
    font-weight: 700;
    text-shadow: none;
    animation: toggleGlow 3s ease-in-out infinite;
}

[data-theme="dark"] #ai-chat-toggle:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 0 40px rgba(0, 212, 255, 0.8),
                0 0 80px rgba(138, 43, 226, 0.6);
    animation: none;
}

@keyframes toggleGlow {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.6),
                    0 0 60px rgba(138, 43, 226, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.9),
                    0 0 80px rgba(138, 43, 226, 0.6);
    }
}

#ai-chat-toggle:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 123, 255, 0.4);
}

#ai-chat-toggle.chat-active {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
}

.chat-toggle-icon {
    font-size: 18px;
    animation: pulse 2s infinite;
}

.chat-toggle-text {
    white-space: nowrap;
    font-size: 13px;
    overflow: visible;
    max-width: 120px;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Queue message styles */
.queue-message {
    text-align: center;
    padding: 15px;
    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    margin: 10px 0;
    color: #6b7280;
    font-style: italic;
}

/* Dark Mode Queue Message - Glitch Effect */
[data-theme="dark"] .queue-message {
    background: linear-gradient(135deg, #1a1f2e, #0f0f23);
    border: 1px solid #8a2be2;
    color: #8a2be2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.2);
    text-shadow: 0 0 5px rgba(138, 43, 226, 0.5);
}

.queue-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.queue-dots {
    display: inline-flex;
    gap: 4px;
}

.queue-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #3B82F6;
    border-radius: 50%;
    animation: queue-pulse 1.5s infinite ease-in-out;
}

.queue-dots span:nth-child(1) { animation-delay: -0.32s; }
.queue-dots span:nth-child(2) { animation-delay: -0.16s; }
.queue-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes queue-pulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat Container - Desktop */
#ai-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Dark Mode Chat Container - Cyberpunk Theme */
[data-theme="dark"] #ai-chat-container {
    background: linear-gradient(145deg, #0a0e1a, #1a1f2e);
    border: 1px solid #00d4ff;
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.3), 
                0 0 0 1px rgba(0, 212, 255, 0.1) inset,
                0 0 40px rgba(138, 43, 226, 0.2);
}

/* Mobile-responsive chat container */
@media (max-width: 768px) {
    #ai-chat-container {
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        height: 70vh;
        max-height: 500px;
        border-radius: 12px;
        min-height: 400px; /* Ensure minimum height for proper scrolling */
    }
    
    .chat-messages {
        padding: 15px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain; /* Prevent scroll chaining on iOS */
    }
    
    /* Fix user message display on mobile */
    .user-message {
        margin-bottom: 12px;
        display: flex !important; /* Force display */
        justify-content: flex-end !important;
        align-items: flex-end;
    }
    
    .user-message .message-content {
        max-width: 85%;
        word-break: break-word;
        display: block !important; /* Ensure visibility */
    }
    
    #ai-chat-toggle {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 13px;
        max-width: 170px;
        min-width: 150px;
    }
    
    .chat-toggle-text {
        font-size: 12px;
        white-space: nowrap;
        overflow: visible;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    #ai-chat-container {
        bottom: 5px;
        right: 5px;
        left: 5px;
        height: 65vh;
        max-height: 450px;
        border-radius: 8px;
    }
    
    #ai-chat-toggle {
        bottom: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
        max-width: 150px;
        min-width: 130px;
    }
}

#ai-chat-container.chat-open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

/* Dark Mode Chat Header - Neon Cyberpunk */
[data-theme="dark"] .chat-header {
    background: linear-gradient(135deg, #0f0f23, #1a1a2e);
    border-bottom: 2px solid #00d4ff;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
    position: relative;
}

[data-theme="dark"] .chat-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #8a2be2, #ff6b6b, #00d4ff);
    background-size: 300% 100%;
    animation: neonFlow 4s linear infinite;
}

@keyframes neonFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
}

/* Dark Mode Chat Avatar - Holographic */
[data-theme="dark"] .chat-avatar {
    background: linear-gradient(45deg, #00d4ff, #8a2be2);
    border: 2px solid #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                0 0 25px rgba(138, 43, 226, 0.3) inset;
    animation: hologramPulse 3s ease-in-out infinite;
}

@keyframes hologramPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                    0 0 25px rgba(138, 43, 226, 0.3) inset;
    }
    50% { 
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.8),
                    0 0 35px rgba(138, 43, 226, 0.5) inset;
    }
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-assistant-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 2px;
}

/* Dark Mode Chat Names - Neon Text */
[data-theme="dark"] .chat-assistant-name {
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.8);
    font-weight: 700;
}

.chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

[data-theme="dark"] .chat-status {
    color: #8a2be2;
    text-shadow: 0 0 8px rgba(138, 43, 226, 0.6);
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    animation: online-pulse 2s infinite;
}

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

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Dark Mode Close Button - Danger Glow */
[data-theme="dark"] .chat-close-btn {
    color: #ff6b6b;
}

[data-theme="dark"] .chat-close-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    box-shadow: 0 0 10px rgba(255, 107, 107, 0.4);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #f8f9fa;
    scroll-behavior: smooth;
    position: relative;
    min-height: 0; /* Allows flex child to shrink below content size */
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
}

/* Dark Mode Chat Messages - Matrix Background */
[data-theme="dark"] .chat-messages {
    background: linear-gradient(145deg, #0a0e1a, #151925);
    position: relative;
}

[data-theme="dark"] .chat-messages::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 43, 226, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 107, 107, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

[data-theme="dark"] .chat-messages > * {
    position: relative;
    z-index: 1;
}

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

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Dark Mode Scrollbar - Neon */
[data-theme="dark"] .chat-messages::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00d4ff, #8a2be2);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

[data-theme="dark"] .chat-messages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00b4d8, #7209b7);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.8);
}

.chat-message {
    margin-bottom: 16px;
    animation: fadeInUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* User Messages */
.user-message {
    display: flex;
    justify-content: flex-end;
}

.user-message .message-content {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    padding: 12px 16px;
    border-radius: 18px 18px 6px 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.2);
}

/* Dark Mode User Messages - Holographic */
[data-theme="dark"] .user-message .message-content {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #0a0e1a;
    border: 1px solid #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4),
                0 2px 10px rgba(0, 212, 255, 0.3);
    text-shadow: none;
    font-weight: 600;
}

.user-message .message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: right;
}

/* Dark Mode Message Times */
[data-theme="dark"] .user-message .message-time,
[data-theme="dark"] .ai-message .message-time {
    color: #8a92a5;
    text-shadow: 0 0 3px rgba(138, 146, 165, 0.3);
}

/* AI Messages */
.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Dark Mode Message Avatar - Pulsing Neon */
[data-theme="dark"] .message-avatar {
    background: linear-gradient(135deg, #8a2be2, #6a1b9a);
    border: 2px solid #8a2be2;
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
    animation: avatarPulse 2s ease-in-out infinite;
}

@keyframes avatarPulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 10px rgba(138, 43, 226, 0.6);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(138, 43, 226, 0.9);
    }
}

.message-bubble {
    flex: 1;
}

.ai-message .message-content {
    background: white;
    border: 1px solid #e9ecef;
    padding: 12px 16px;
    border-radius: 6px 18px 18px 18px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Dark Mode AI Messages - Purple Glow */
[data-theme="dark"] .ai-message .message-content {
    background: linear-gradient(135deg, #1a1f2e, #2a2f3e);
    border: 1px solid #8a2be2;
    color: #e0e6ed;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.3),
                0 2px 8px rgba(138, 43, 226, 0.2);
}

.ai-message .message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

/* Message Content Formatting */
.message-content strong {
    font-weight: 600;
}

.chat-phone-link, .chat-email-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
}

.user-message .chat-phone-link,
.user-message .chat-email-link {
    color: rgba(255, 255, 255, 0.9);
}

/* Typing Indicator */
.chat-typing {
    padding: 16px 20px 8px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Dark Mode Typing Indicator */
[data-theme="dark"] .chat-typing {
    background: linear-gradient(145deg, #0a0e1a, #151925);
}

[data-theme="dark"] .typing-text {
    color: #8a92a5;
    text-shadow: 0 0 5px rgba(138, 146, 165, 0.3);
}

[data-theme="dark"] .typing-indicator span {
    background: #00d4ff;
    box-shadow: 0 0 5px rgba(0, 212, 255, 0.5);
}

.typing-indicator {
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #6c757d;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.typing-text {
    font-size: 12px;
    color: #6c757d;
    font-style: italic;
}

/* Chat Input Area */
.chat-input-container {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 16px;
}

/* Dark Mode Input Container - Glowing Border */
[data-theme="dark"] .chat-input-container {
    background: linear-gradient(145deg, #0a0e1a, #1a1f2e);
    border-top: 2px solid #00d4ff;
    box-shadow: 0 -5px 15px rgba(0, 212, 255, 0.2);
}

.chat-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quick-action-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.quick-action-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Dark Mode Quick Action Buttons - Neon Pills */
[data-theme="dark"] .quick-action-btn {
    background: linear-gradient(135deg, #1a1f2e, #2a2f3e);
    border: 1px solid #404650;
    color: #8a92a5;
}

[data-theme="dark"] .quick-action-btn:hover {
    background: linear-gradient(135deg, #2a2f3e, #3a3f4e);
    border-color: #00d4ff;
    color: #00d4ff;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.quick-action-btn i {
    font-size: 11px;
}

/* Message Action Buttons */
.message-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.action-btn.safe-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.action-btn.safe-btn:hover {
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Chat Input */
.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 24px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s;
}

.chat-input-wrapper:focus-within {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

/* Dark Mode Input Wrapper - Neon Focus */
[data-theme="dark"] .chat-input-wrapper {
    background: linear-gradient(135deg, #1a1f2e, #2a2f3e);
    border: 1px solid #404650;
}

[data-theme="dark"] .chat-input-wrapper:focus-within {
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.3),
                0 0 15px rgba(0, 212, 255, 0.2);
}

#chat-input {
    flex: 1;
    border: none;
    background: none;
    resize: none;
    outline: none;
    font-size: 14px;
    line-height: 1.4;
    min-height: 20px;
    max-height: 80px;
    padding: 6px 0;
    font-family: inherit;
}

/* Dark Mode Input Text */
[data-theme="dark"] #chat-input {
    color: #e0e6ed;
}

[data-theme="dark"] #chat-input::placeholder {
    color: #8a92a5;
}

.chat-send-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Dark Mode Send Button - Pulsing Neon */
[data-theme="dark"] .chat-send-btn {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: #0a0e1a;
    border: 2px solid #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    animation: sendBtnPulse 2s ease-in-out infinite;
}

[data-theme="dark"] .chat-send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.8);
    animation: none;
}

@keyframes sendBtnPulse {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
    }
    50% { 
        box-shadow: 0 0 25px rgba(0, 212, 255, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    #ai-chat-container {
        width: calc(100vw - 20px);
        height: calc(100vh - 40px);
        max-width: 400px;
        right: 10px;
        bottom: 10px;
    }
    
    #ai-chat-toggle {
        right: 15px;
        bottom: 15px;
        padding: 10px 16px;
        max-width: 170px;
        min-width: 150px;
    }
    
    .chat-toggle-text {
        font-size: 12px;
        white-space: nowrap;
        overflow: visible;
    }
    
    .chat-messages {
        padding: 16px;
    }
    
    .chat-input-container {
        padding: 12px;
    }
    
    .chat-quick-actions {
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .quick-action-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    #ai-chat-container {
        width: calc(100vw - 10px);
        height: calc(100vh - 20px);
        right: 5px;
        bottom: 5px;
        border-radius: 12px;
    }
    
    .chat-header {
        padding: 12px 16px;
        border-radius: 12px 12px 0 0;
    }
    
    .chat-assistant-name {
        font-size: 14px;
    }
    
    .chat-status {
        font-size: 11px;
    }
}

/* Navigation Buttons */
.chat-navigation-buttons {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chat-nav-btn {
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.chat-nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.chat-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-nav-btn i {
    font-size: 11px;
}

/* Button Colors */
.chat-nav-btn.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.chat-nav-btn.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    color: white;
}

.chat-nav-btn.btn-danger {
    background: linear-gradient(135deg, #dc3545, #b02a37);
    color: white;
}

.chat-nav-btn.btn-danger:hover {
    background: linear-gradient(135deg, #b02a37, #8b1e2b);
    color: white;
}

.chat-nav-btn.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.chat-nav-btn.btn-success:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    color: white;
}

.chat-nav-btn.btn-info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
    color: white;
}

.chat-nav-btn.btn-info:hover {
    background: linear-gradient(135deg, #117a8b, #0c525d);
    color: white;
}

.chat-nav-btn.btn-warning {
    background: linear-gradient(135deg, #ffc107, #d39e00);
    color: #212529;
}

.chat-nav-btn.btn-warning:hover {
    background: linear-gradient(135deg, #d39e00, #b07e00);
    color: #212529;
}

.chat-nav-btn.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    color: white;
}

.chat-nav-btn.btn-secondary:hover {
    background: linear-gradient(135deg, #545b62, #3d4043);
    color: white;
}

/* Mobile Navigation Buttons */
@media (max-width: 768px) {
    .chat-navigation-buttons {
        margin-top: 10px;
        gap: 6px;
    }
    
    .chat-nav-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 16px;
    }
    
    .chat-nav-btn i {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .chat-nav-btn {
        padding: 5px 10px;
        font-size: 10px;
        gap: 4px;
    }
}

/* Chat action buttons for ticket creation */
.chat-action-buttons {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    padding: 0 10px;
    justify-content: center;
}

.chat-action-btn {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 120px;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.chat-action-btn:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.chat-action-btn i {
    font-size: 14px;
}

.create-ticket-btn {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.create-ticket-btn:hover {
    background: linear-gradient(135deg, #1e7e34, #155724);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Mobile responsiveness for action buttons */
@media (max-width: 480px) {
    .chat-action-buttons {
        flex-direction: column;
        gap: 6px;
    }
    
    .chat-action-btn {
        min-width: auto;
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
    }
}