/* ========================================
   News Section Styles
   ======================================== */

/* News Container */
.askany-news-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    min-height: 0;
    /* Important for flex children to scroll */
}

/* News List */
.askany-news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    /* Important for flex children to scroll */
}

.askany-news-list::-webkit-scrollbar {
    width: 6px;
}

.askany-news-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.askany-news-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
}

/* News Card */
.news-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    /* Prevent cards from shrinking */
    min-height: 280px;
    /* Ensure cards maintain minimum height */
}

.news-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

/* Image at top */
.news-card-image-wrapper {
    width: 100%;
    overflow: hidden;
}

.news-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image {
    transform: scale(1.05);
}

/* Card body contains title, excerpt, footer */
.news-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Title below image */
.news-card-title {
    font-weight: 600;
    font-size: 15px;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* Excerpt/description below title */
.news-card-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    flex: 1;
}

/* Footer with date and arrow at bottom */
.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.news-card-date {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.news-card-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.news-card-arrow svg {
    width: 14px;
    height: 14px;
}

.news-card:hover .news-card-arrow {
    transform: translateX(4px);
    color: #6b7280;
}

/* News Empty State */
.news-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    color: #9ca3af;
}

.news-empty-state svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.news-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* Full Post View */
.askany-news-full {
    display: flex;
    flex-direction: column;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    animation: slideInRight 0.3s ease;
    background: linear-gradient(180deg, rgba(247, 250, 252, 0.8), rgba(255, 255, 255, 0.9));
}

.askany-news-article {
    padding: 0 20px 20px 20px;
}

.askany-news-full::-webkit-scrollbar {
    width: 6px;
}

.askany-news-full::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.askany-news-full::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 3px;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.askany-news-header {
    position: sticky;
    top: 0;
    z-index: 100;
    margin-bottom: 20px;
    padding: 16px 20px;
    border-bottom: 2px solid #e5e7eb;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.askany-news-header.scrolled {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.askany-news-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e5e7eb;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.askany-news-header.scrolled .askany-news-back {
    padding: 8px 12px;
    font-size: 13px;
    gap: 6px;
}

.askany-news-back:hover {
    color: #111827;
    background: rgba(255, 255, 255, 1);
    border-color: #d1d5db;
    transform: translateX(-2px);
}

.askany-news-back svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

.askany-news-header.scrolled .askany-news-back svg {
    width: 14px;
    height: 14px;
}

.askany-news-article h1 {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.askany-news-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.news-date,
.news-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.askany-news-featured {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 24px;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.askany-news-content {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}

.askany-news-content p {
    margin: 0 0 18px 0;
}

.askany-news-content h2,
.askany-news-content h3,
.askany-news-content h4 {
    margin: 28px 0 14px 0;
    color: #111827;
    font-weight: 700;
}

.askany-news-content h2 {
    font-size: 20px;
}

.askany-news-content h3 {
    font-size: 18px;
}

.askany-news-content h4 {
    font-size: 16px;
}

.askany-news-content ul,
.askany-news-content ol {
    margin: 0 0 18px 0;
    padding-left: 28px;
}

.askany-news-content li {
    margin-bottom: 10px;
}

.askany-news-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.askany-news-content a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.askany-news-content a:hover {
    text-decoration: underline;
}

.askany-news-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 20px 0;
    color: #6b7280;
    font-style: italic;
    background: rgba(102, 126, 234, 0.05);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
}

.askany-news-content code {
    background: #f3f4f6;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
    color: #e53e3e;
}

.askany-news-content pre {
    background: #1f2937;
    color: #f3f4f6;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.askany-news-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Widget Expansion for Full Post - Significantly larger like opening a page */
.askany-chat-widget.news-expanded .askany-chat-container {
    width: 700px !important;
    max-width: 95vw;
    height: 85vh !important;
    max-height: 800px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* For inline widgets */
.askany-chat-widget.inline.news-expanded .askany-chat-container {
    width: 100% !important;
    max-width: 900px;
    height: 85vh !important;
    max-height: 900px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .askany-chat-widget.news-expanded .askany-chat-container {
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }

    .news-card-image {
        height: 140px;
    }

    .askany-news-article h1 {
        font-size: 22px;
    }

    .askany-news-full {
        padding: 0;
        flex: 1;
        min-height: 0;
    }

    .askany-news-article {
        padding: 0 16px 16px 16px;
    }

    .askany-news-header {
        padding: 12px 16px;
    }

    .askany-news-header.scrolled {
        padding: 8px 16px;
    }

    .askany-news-content {
        font-size: 14px;
    }

    /* Ensure news container takes full height on mobile */
    .askany-news-container {
        flex: 1;
        min-height: 0;
    }

    /* Prevent body scroll when news is expanded on mobile */
    body.askany-news-viewing {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
    }
}

/* Loading State */
.news-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: #9ca3af;
}

.news-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Report/Feature Form Styles */
.askany-report-feature-form {
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    margin: 15px 0;
    border: 2px solid rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: askany-fade-in 0.4s ease;
}

.report-form-header {
    margin-bottom: 20px;
    text-align: center;
}

.report-form-title {
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.report-form-description {
    font-size: 14px;
    color: #718096;
    margin: 0;
}

.report-form-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
}

.form-field .required {
    color: #e53e3e;
}

.form-field input,
.form-field textarea {
    padding: 10px 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

.form-field textarea {
    resize: vertical;
    min-height: 80px;
}

.form-field-note {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    text-align: center;
}

.form-field-note p {
    margin: 0;
    font-size: 13px;
    color: #4a5568;
    font-weight: 500;
}

.form-field-note strong {
    color: #667eea;
    font-weight: 700;
}

/* Submit button styling */
.report-submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 8px;
}

.report-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #5a6fd8, #6b42a0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.report-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}


/* Hide chat input when form is visible - REMOVED, users need to type "confirm" */
/* Keep chat input visible so users can type confirm/submit */

/* Hide suggested prompts when form is visible */
.askany-chat-widget.form-mode .suggested-prompts {
    display: none !important;
}

/* Add some spacing between form and chat input */
.askany-chat-widget.form-mode .askany-chat-input {
    margin-top: 10px;
}




/* Fix scroll issues in Messages tab */
.askany-main-tab-content#messages-tab .askany-chat-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.askany-main-tab-content#messages-tab .askany-chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 15px;
    margin-top: -14px;
}

.askany-main-tab-content#messages-tab .askany-contact-form {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 15px;
}

/* Direct chat content scroll fixes (when home page is disabled) */
.askany-direct-chat-content .askany-chat-tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.askany-direct-chat-content .askany-chat-messages {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 15px;
}

.askany-direct-chat-content .askany-contact-form {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding: 15px;
}

/* Ensure chat tabs are visible and properly positioned */
.askany-main-tab-content#messages-tab .askany-chat-tabs {
    flex-shrink: 0;
    display: flex;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.askany-direct-chat-content .askany-chat-tabs {
    flex-shrink: 0;
    display: flex;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}


/* Fix for suggested prompts positioning in nested structure */
.askany-main-tab-content#messages-tab .suggested-prompts,
.askany-direct-chat-content .suggested-prompts {
    position: relative;
    bottom: 144px;
    display: block;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Fix for chat input in nested structure */
.askany-main-tab-content#messages-tab .askany-chat-input,
.askany-direct-chat-content .askany-chat-input {
    flex-shrink: 0;
    padding: 10px 15px;
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    position: absolute;
    bottom: -15px;
    width: 100%;
}

/* Ensure proper height for the entire Messages tab structure */
.askany-main-tab-content#messages-tab {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.askany-main-tab-content#messages-tab.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Fix for contact form scrolling */
.askany-main-tab-content#messages-tab .askany-contact-form form,
.askany-direct-chat-content .askany-contact-form form {
    max-width: 100%;
    height: auto;
}

.askany-main-tab-content#messages-tab .askany-contact-form input,
.askany-main-tab-content#messages-tab .askany-contact-form textarea,
.askany-direct-chat-content .askany-contact-form input,
.askany-direct-chat-content .askany-contact-form textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Responsive fixes for nested structure */
@media (max-width: 480px) {

    .askany-main-tab-content#messages-tab .askany-chat-messages,
    .askany-direct-chat-content .askany-chat-messages {
        padding: 10px;
    }

    .askany-main-tab-content#messages-tab .askany-contact-form,
    .askany-direct-chat-content .askany-contact-form {
        padding: 10px;
    }
}

/* Mi
nimized widget styles */
.askany-chat-container.minimized {
    height: auto !important;
    min-height: auto !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.askany-chat-container.minimized .askany-chat-header {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 20px 20px 20px 20px;
    position: relative;
    overflow: hidden;
}

.askany-chat-container.minimized .askany-chat-header:hover {
    background: rgba(0, 123, 186, 0.03);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 186, 0.08);
}

/* Ensure avatar stays normal on hover */
.askany-chat-container.minimized .askany-chat-header:hover .assistant-avatar {
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: none;
}

.askany-chat-container.minimized .askany-chat-header:hover .assistant-avatar img {
    opacity: 1;
    filter: none;
}

/* Hide content wrapper and tabs when minimized */
.askany-chat-container.minimized .askany-content-wrapper {
    display: none !important;
}

.askany-chat-container.minimized .askany-main-tabs {
    display: none !important;
}

/* Hide main tabs when Get Started page is visible */
.askany-chat-container.has-get-started .askany-main-tabs {
    display: none !important;
}

/* Smooth transitions for minimize/restore */
.askany-content-wrapper {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.askany-main-tabs {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Header positioning for minimized state tooltip */
.askany-chat-header {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimize button state changes */
.minimize-btn {
    transition: all 0.3s ease;
}

.minimize-btn:hover {
    background: rgba(0, 123, 186, 0.1);
    color: #007cba;
    transform: scale(1.1);
}

/* Ensure widget stays in position when minimized */
.askany-chat-widget .askany-chat-container.minimized {
    position: relative;
    transform: none;
}

/* Mobile responsive adjustments for minimized state */
@media (max-width: 480px) {

    /* Hide tooltip on mobile for minimized state */
    .askany-chat-container.minimized .askany-chat-header::after {
        display: none;
    }

    .askany-chat-container.minimized .askany-chat-header:hover {
        transform: none;
    }
}

.encryption-status {
    position: absolute;
    bottom: 5px;
    right: 10px;
    font-size: 10px;
    color: #10b981;
    opacity: 0.7;
    display: flex;
    align-items: center;
    gap: 2px;
}

.encryption-status.disabled {
    color: #ef4444;
}

.encryption-status::before {
    content: "🔒";
    font-size: 8px;
}

.encryption-status.disabled::before {
    content: "🔓";
}

/* Security notice */
.security-notice {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.security-notice::before {
    content: "🛡️";
    font-size: 12px;
}

.security-notice.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.security-notice.warning::before {
    content: "⚠️";
}

/*
 Enhanced Message Formatting Styles */
.message-bubble a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.message-bubble a:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary-hover);
}

.external-source-ref {
    background: rgba(74, 108, 247, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 8px 12px;
    margin: 8px 0;
    border-radius: 4px;
    font-size: 13px;
}

.external-source-ref strong {
    color: var(--primary-color);
    font-weight: 600;
}

.external-source-ref a {
    color: var(--primary-color);
    font-weight: 500;
}

.message-bubble ul,
.message-bubble ol {
    margin: 8px 0;
    padding-left: 20px;
}

.message-bubble li {
    margin: 4px 0;
}

.message-bubble br+br {
    display: block;
    margin: 8px 0;
    content: "";
}

/* Prevent auto-scroll indicator */
.chat-messages.user-scrolling {
    scroll-behavior: auto;
}

.chat-messages:not(.user-scrolling) {
    scroll-behavior: smooth;
}

/* New message highlight animation */
.chat-message.new-message {
    animation: messageHighlight 2s ease-out;
}

@keyframes messageHighlight {
    0% {
        background-color: rgba(74, 108, 247, 0.1);
        transform: translateX(-5px);
    }

    100% {
        background-color: transparent;
        transform: translateX(0);
    }
}

/* Better link styling in messages */
.message-bubble a[href^="http"]:after {
    content: " 🔗";
    font-size: 12px;
    opacity: 0.7;
}

.message-bubble a[href^="mailto"]:after {
    content: " ✉️";
    font-size: 12px;
    opacity: 0.7;
}

/* Improved list formatting */
.message-bubble p {
    margin: 8px 0;
    font-size: 14px;
}

.message-bubble p:first-child {
    margin-top: 0;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

/* File Attachment Styles */
.attachment-preview-container {
    background: rgba(248, 249, 250, 0.98);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin: 5px 7px 5px 14px;
    padding: 10px;
    max-height: 100px;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border-left: 3px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    bottom: 100px;
}

.attachment-preview-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 13px;
}

.attachment-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachment-preview-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    position: relative;
}

.attachment-preview-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    overflow: hidden;
    margin-right: 10px;
    flex-shrink: 0;
}

.attachment-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-preview-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
    border-radius: 4px;
    margin-right: 10px;
    flex-shrink: 0;
    color: var(--light-text);
}

.attachment-preview-info {
    flex: 1;
    min-width: 0;
}

.attachment-preview-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attachment-preview-size {
    font-size: 11px;
    color: var(--light-text);
    margin-top: 2px;
}

.attachment-remove-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    /* width: 24px;
    height: 24px; */
    border: none;
    background: rgb(255, 255, 255);
    color: #dc3545;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: bold;
}

.attachment-remove-btn:hover {
    transform: scale(1.1);
    color: #dc3545;
    background: rgb(255, 255, 255);
}

.attachment-remove-btn svg {
    width: 12px;
    height: 12px;
}

.attachment-preview-actions {
    margin-top: 8px;
    text-align: right;
}

.attachment-clear-all-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--light-text);

    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.attachment-clear-all-btn:hover {
    background: var(--light-bg);
    color: var(--text-color);
}

/* Send Attatchmed Add here*/
button.attachment-send-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--light-text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 5px;
}

/* Drag and drop styles */
.askany-chat-messages.drag-over {
    background: rgba(74, 108, 247, 0.05);
    border: 2px dashed var(--primary-color);
    position: relative;
}

.askany-chat-messages.drag-over::after {
    content: "📎 Drop files here to attach";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    z-index: 10;
    pointer-events: none;
}

/* File attachment button enhancement */
.attachment-btn {
    position: relative;
}

.attachment-btn.has-files::after {
    content: attr(data-count);
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* File attachment message styling */
.message-bubble .file-attachment-info {
    background: rgba(74, 108, 247, 0.1);
    border-left: 3px solid var(--primary-color);
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    font-size: 12px;
    color: var(--primary-color);
}

.message-bubble .file-attachment-list {
    margin: 8px 0;
}

.message-bubble .file-attachment-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    margin: 4px 0;
    font-size: 12px;
}

.message-bubble .file-attachment-item svg {
    margin-right: 6px;
    flex-shrink: 0;
}

.attachment-preview-header {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-size: 13px;
}

.attachment-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* AJAX Product Functionality Styles */

/* Enhanced product action buttons */
.product-actions .view-button,
.product-actions .add-to-cart-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 8px;
    text-decoration: none;
    display: inline-block;
}

.product-actions .view-button {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.product-actions .view-button:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.product-actions .add-to-cart-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
}

.product-actions .add-to-cart-button.added {
    background: #28a745;
    transform: scale(1.05);
}

.product-actions .add-to-cart-button:disabled,
.product-actions .view-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Modal for View Product  */
/* Clean WooCommerce-Style Product Modal */
.askany-product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: none;
}

.askany-product-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.3);
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    line-height: 1;
}

.modal-close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
    background: #fff;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.modal-product-image {
    text-align: center;
    margin-bottom: 24px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.modal-product-image img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 4px;
}

.modal-product-details>* {
    margin-bottom: 16px;
}

.modal-product-price {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-product-price .sale-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-product-sku {
    font-size: 13px;
    color: #777;
    margin-bottom: 8px;
}

.modal-product-stock {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.modal-product-stock::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.modal-product-stock.in-stock {
    color: #46b450;
    background: #ecf7ed;
}

.modal-product-stock.in-stock::before {
    background: #46b450;
}

.modal-product-stock.out-of-stock {
    color: #dc3232;
    background: #f9e2e2;
}

.modal-product-stock.out-of-stock::before {
    background: #dc3232;
}

.modal-product-description {
    line-height: 1.6;
    color: #555;
    font-size: 14px;
    padding: 16px 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    margin: 16px 0;
}

.modal-product-categories,
.modal-product-rating {
    font-size: 13px;
    padding: 4px 0;
    display: inline-block;
    margin-right: 16px;
}

.modal-product-categories {
    color: #666;
}

.modal-product-rating {
    color: #f90;
    font-weight: 600;
}

.modal-product-attributes {
    margin-top: 20px;
    padding: 16px;
    background: #f9f9f9;
    border-radius: 4px;
}

.modal-product-attributes h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.modal-product-attributes ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-product-attributes li {
    padding: 8px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #e5e5e5;
}

.modal-product-attributes li:last-child {
    border-bottom: none;
}

.modal-product-attributes li strong {
    color: #333;
    font-weight: 600;
    margin-right: 8px;
}

.modal-footer {
    padding: 20px 24px;
    background: #f9f9f9;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-quantity-selector label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin: 0;
}

.modal-quantity-selector input {
    width: 60px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    background: white;
}

.modal-quantity-selector input:focus {
    outline: none;
    border-color: #999;
}

.modal-add-to-cart-btn {
    background: #0071a1;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    min-width: 140px;
}

.modal-add-to-cart-btn:hover {
    background: #005177;
}

.modal-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal-add-to-cart-btn.added {
    background: #46b450;
}

.modal-view-product-btn {
    background: transparent;
    color: #0071a1;
    border: 1px solid #0071a1;
    padding: 10px 20px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.modal-view-product-btn:hover {
    background: #0071a1;
    color: white;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .askany-product-modal {
        width: 95%;
        max-width: 95%;
    }

    .modal-header {
        padding: 16px 20px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-product-image {
        padding: 16px;
    }

    .modal-product-image img {
        max-height: 300px;
    }

    .modal-product-price {
        font-size: 20px;
    }

    .modal-footer {
        padding: 16px 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .modal-quantity-selector {
        justify-content: flex-start;
    }

    .modal-add-to-cart-btn,
    .modal-view-product-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modal-header h3 {
        font-size: 16px;
    }

    .modal-product-price {
        font-size: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-view-product-btn {
        font-size: 13px;
        padding: 14px 20px;
    }
}

/* Enhanced Loading States */
.ajax-view-product:disabled,
.ajax-add-to-cart:disabled {
    position: relative;
    color: transparent;
    cursor: not-allowed;
    opacity: 0.7;
}

.ajax-view-product:disabled::after,
.ajax-add-to-cart:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid transparent;
    border-top: 3px solid currentColor;
    border-radius: 50%;
    animation: modernSpin 1s linear infinite;
}

@keyframes modernSpin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
        border-top-color: currentColor;
    }

    25% {
        border-right-color: currentColor;
    }

    50% {
        border-bottom-color: currentColor;
    }

    75% {
        border-left-color: currentColor;
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
        border-top-color: currentColor;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .askany-product-modal {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-body {
        background: linear-gradient(to bottom, #1e293b, #334155);
    }

    .modal-footer {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-quantity-selector input {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(255, 255, 255, 0.2);
        color: #f1f5f9;
    }

    .modal-quantity-selector input:focus {
        border-color: #667eea;
        background: rgba(15, 23, 42, 0.9);
    }

    .modal-quantity-selector label {
        color: #cbd5e1;
    }

    .modal-product-description {
        background: rgba(15, 23, 42, 0.8);
        color: #cbd5e1;
    }

    .modal-product-attributes {
        background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .modal-product-attributes h4 {
        color: #f1f5f9;
    }

    .modal-product-attributes li {
        background: rgba(15, 23, 42, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
        color: #cbd5e1;
    }
}

/* Success animation for add to cart */
.add-to-cart-button.added {
    position: relative;
}

.add-to-cart-button.added::before {
    content: '✓';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
}

/* Enhanced product cards in chat */
.product-item.enhanced {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 8px 0;
    transition: all 0.2s ease;
}

.product-item.enhanced:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Car
t Success Message Styles */
.cart-success-message {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-left: 4px solid #28a745;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin: 8px 0;
}

.cart-success-message .success-text {
    color: #155724;
    font-weight: 500;
    margin-bottom: 8px;
}

.cart-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.view-cart-btn,
.checkout-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.view-cart-btn {
    background: #fcfcfc;
    color: white;
}

.view-cart-btn:hover {
    background: #fdf4f4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
    color: white;
    text-decoration: none;
}

.checkout-btn {
    background: #a7ffbb;
    color: white;
}

.checkout-btn:hover {
    background: #8ef1a5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    color: white;
    text-decoration: none;
}

.view-cart-btn::before {
    content: '🛒';
    margin-right: 6px;
}

.checkout-btn::before {
    content: '💳';
    margin-right: 6px;
}

/* Mobile responsiveness for cart actions */
@media (max-width: 480px) {
    .cart-actions {
        flex-direction: column;
    }

    .view-cart-btn,
    .checkout-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* Additional Cart Success Message Styles */
.cart-summary {
    margin: 8px 0;
}

.cart-total {
    color: #155724;
    font-weight: 600;
    font-size: 14px;
}

.continue-shopping-btn {
    background: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.continue-shopping-btn:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.continue-shopping-btn::before {
    content: '🛍️';
    margin-right: 6px;
}

/* 
Smooth Message Animation Styles */
.chat-message.message-entering {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-message.message-entered {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Enhanced product message animations */
.chat-message.assistant-message .product-message {
    animation: productSlideIn 0.5s ease-out;
}

@keyframes productSlideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Smooth scroll behavior for messages container */
.askany-chat-messages {
    scroll-behavior: smooth;
}

/* Enhanced typing indicator with pulse animation */
.typing-indicator {
    animation: typingPulse 1.5s ease-in-out infinite;
}

@keyframes typingPulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* User typing indicator styles */
.user-typing-indicator {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.user-typing-indicator .typing-text {
    opacity: 0.8;
}

.user-typing-indicator .typing-dots {
    display: flex;
    gap: 3px;
}

.user-typing-indicator .typing-dot {
    width: 4px;
    height: 4px;
    /* background-color: var(--primary-color); */
    border-radius: 50%;
    animation: userTypingDot 1.2s infinite ease-in-out;
}

.user-typing-indicator .typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.user-typing-indicator .typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.user-typing-indicator .typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes userTypingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* User typing indicator message bubble styling */
#user-typing-indicator .message-bubble {
    background-color: rgba(74, 108, 247, 0.1);
    border: 1px solid rgba(74, 108, 247, 0.2);
    color: var(--primary-color);
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Remote typing indicator styles */
.remote-typing-indicator-content {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.remote-typing-indicator-content .typing-text {
    opacity: 0.8;
    font-weight: 500;
}

.remote-typing-indicator-content .typing-dots {
    display: flex;
    gap: 2px;
}

.remote-typing-indicator-content .typing-dot {
    width: 4px;
    height: 4px;
    background-color: #999;
    border-radius: 50%;
    animation: remoteTypingDot 1.4s infinite ease-in-out;
}

.remote-typing-indicator-content .typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.remote-typing-indicator-content .typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.remote-typing-indicator-content .typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes remoteTypingDot {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.3;
    }

    30% {
        transform: translateY(-6px);
        opacity: 0.8;
    }
}

/* Remote typing indicator message bubble styling */
.remote-typing-indicator .message-bubble {
    background-color: rgba(153, 153, 153, 0.1);
    border: 1px solid rgba(153, 153, 153, 0.2);
    color: #666;
    animation: fadeInUp 0.3s ease-out;
}

/* Responsive adjustments for typing indicators */
@media (max-width: 480px) {

    .user-typing-indicator,
    .remote-typing-indicator-content {
        font-size: 11px;
        padding: 6px 8px;
    }

    .user-typing-indicator .typing-dot,
    .remote-typing-indicator-content .typing-dot {
        width: 3px;
        height: 3px;
    }
}

/* Staggered animation for multiple products */
.product-item.enhanced:nth-child(1) {
    animation-delay: 0s;
}

.product-item.enhanced:nth-child(2) {
    animation-delay: 0.2s;
}

.product-item.enhanced:nth-child(3) {
    animation-delay: 0.4s;
}

.product-item.enhanced:nth-child(4) {
    animation-delay: 0.6s;
}

.product-item.enhanced:nth-child(5) {
    animation-delay: 0.8s;
}

/* Smooth hover effects for product cards */
.product-item.enhanced {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-item.enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Enhanced message bubble animations */
.message-bubble {
    transition: all 0.2s ease;
}

.chat-message:hover .message-bubble {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Smooth scroll animation override for jQuery animate */
.askany-chat-messages.smooth-scrolling {
    scroll-behavior: auto;
    /* Let jQuery handle the animation */
}

/* S
ystem Message Styles */
.chat-message.system-message {
    margin: 10px 0;
    text-align: center;
}

.message-bubble.system-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: inline-block;
    max-width: 80%;
    animation: systemMessageSlide 0.5s ease-out;
}

@keyframes systemMessageSlide {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Typing Indicator Styles */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f2f5;
    border-radius: 18px;
    margin: 8px 0;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #999;
    border-radius: 50%;
    animation: typing-dot-animation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-dot-animation {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Remote Typing Indicator */
.remote-typing-indicator {
    margin: 8px 0;
    padding: 8px 12px;
    background: rgba(74, 108, 247, 0.1);
    border: 1px solid rgba(74, 108, 247, 0.2);
    border-radius: 12px;
    font-size: 13px;
    color: #4a6cf7;
    font-style: italic;
    animation: fadeInUp 0.3s ease-out;
}

.remote-typing-indicator .typing-text {
    font-weight: 500;
}

.remote-typing-indicator .typing-dots {
    display: inline-flex;
    margin-left: 8px;
}

.remote-typing-indicator .typing-dot {
    width: 4px;
    height: 4px;
    background-color: #4a6cf7;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User Typing Indicator */
.user-typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(74, 108, 247, 0.1);
    border-radius: 12px;
    font-size: 12px;
    color: #fafafa;
}

.user-typing-indicator .typing-text {
    font-weight: 500;
}

.typing-text {
    font-size: 14px;
    font-weight: 600;
}

.typing-dots .typing-dot {
    width: 6px;
    height: 6px;
    background-color: #1976d2;
    border-radius: 50%;
    animation: admin-typing-dot-animation 1.2s infinite;
}

@keyframes admin-typing-dot-animation {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.4;
    }

    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* Notification Badge Enhancement */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Encryption Status Indicator */
.encryption-status {
    position: absolute;
    bottom: 4px;
    right: 10px;
    color: #c30000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.encryption-status.disabled {
    background: #ff9800;
}

/* Security Notice */
.security-notice {
    margin: 10px 0;
    padding: 8px 12px;
    background: #e8f5e8;
    border: 1px solid #4caf50;
    border-radius: 8px;
    color: #2e7d32;
    font-size: 12px;
    text-align: center;
    animation: securityNoticeSlide 0.5s ease-out;
}

.security-notice.warning {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
}

@keyframes securityNoticeSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
Message Avatar Styles */
.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.message-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar .avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.message-avatar .avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-avatar .user-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-avatar .assistant-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.message-avatar .agent-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.message-avatar svg {
    width: 18px;
    height: 18px;
}

/* User messages - avatar on right */
.user-message {
    flex-direction: row-reverse;
}

.user-message .message-bubble {
    margin-left: 0;
    margin-right: 0;
}

/* Assistant messages - avatar on left */
.assistant-message {
    flex-direction: row;
}

/* Markdown Formatting Styles */
.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 {
    margin: 0.5em 0 0.3em 0;
    font-weight: 600;
    line-height: 1.3;
}

.message-bubble h1 {
    font-size: 1.5em;
}

.message-bubble h2 {
    font-size: 1.3em;
}

.message-bubble h3 {
    font-size: 1.1em;
}

.message-bubble h4 {
    font-size: 1em;
}

.message-bubble h5 {
    font-size: 0.9em;
}

.message-bubble h6 {
    font-size: 0.85em;
}

.message-bubble p {
    margin: 0.5em 0;
    line-height: 1.6;
    font-size: 14px;
}

.message-bubble code {
    font-size: 0.9em;
    padding: 2px 6px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    color: #d63638;

}

.message-bubble pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 12px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-bubble pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 14px;
    line-height: 1.5;
}

.message-bubble ul,
.message-bubble ol {
    margin: 10px 0;
    padding-left: 25px;
}

.message-bubble li {
    margin: 5px 15px;
    line-height: 1.6;
}

.message-bubble blockquote {
    border-left: 4px solid #ddd;
    padding-left: 15px;
    margin: 10px 0;
    color: #666;
    font-style: italic;
}

.message-bubble strong {
    font-weight: 600;
}

.message-bubble em {
    font-style: italic;
}

.message-bubble del {
    text-decoration: line-through;
    opacity: 0.7;
}

.message-bubble a {
    color: #4361ee;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.message-bubble a:hover {
    border-bottom-color: #4361ee;
}

/* Dark theme adjustments */
.theme-dark .message-bubble code {
    background: rgba(255, 255, 255, 0.1);
}

.theme-dark .message-bubble pre {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .message-bubble blockquote {
    border-left-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .message-avatar {
        width: 28px;
        height: 28px;
    }

    .message-avatar .avatar-icon {
        width: 28px;
        height: 28px;
    }

    .message-avatar svg {
        width: 16px;
        height: 16px;
    }

    .chat-message {
        gap: 8px;
    }
}