/* Extracted from chat_widget.php */
/* Modern Chat Widget Styling - LiveChat Inspired */

/* Chat Widget Container */
.chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.chat-widget-container.attention {
    animation: pulse 2s infinite;
}

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

/* Chat Widget Button - Removed (using navigation instead) */

/* Main Chat Widget Popup */
.chat-widget-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #1a1a1a;
    border-radius: 0;
    box-shadow: none;
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    color: #e5e7eb;
    /* Scroll izolasyonu için */
    contain: layout style paint;
}

.chat-widget-popup.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Typing Indicator */
.typing-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing-animation 1.4s infinite ease-in-out both;
}

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

@keyframes typing-animation {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Chat Action Button */
.chat-action-btn {
    display: inline-block;
    background-color: #3b82f6;
    color: white !important;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none !important;
    margin: 5px 0;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

.chat-action-btn:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.4);
}

/* Message Buttons */
.chat-message-btn {
    display: inline-block;
    background-color: #374151;
    color: #e5e7eb;
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin: 4px 2px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-message-btn:hover {
    background-color: #4b5563;
    border-color: #6b7280;
    color: white;
}

.chat-message-btn.action-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.chat-message-btn.action-btn:hover {
    background-color: #2563eb;
}

@media (min-width: 768px) {
    .chat-widget-popup {
        position: absolute;
        top: auto;
        left: auto;
        bottom: 0;
        right: 0;
        width: 380px;
        height: 600px;
        max-height: calc(100vh - 40px);
        border-radius: 16px;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
        border: 1px solid #374151;
        transform-origin: bottom right;
    }

    .chat-widget-popup.active {
        animation: scaleIn 0.2s ease-out;
    }

    @keyframes scaleIn {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }
}

/* Header */
.chat-widget-header {
    padding: 20px 24px;
    border-bottom: 1px solid #374151;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #111827;
    border-radius: 0;
    flex-shrink: 0;
}

.chat-widget-drag-handle {
    display: none;
}

.drag-dots {
    display: none;
}

.chat-widget-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.chat-widget-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: #1f2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.avatar-status {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
}

.chat-widget-info {
    flex: 1;
}

.chat-widget-status {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-widget-name {
    font-size: 14px;
    font-weight: 600;
    color: #f9fafb;
    margin-top: 2px;
}

.chat-widget-actions {
    display: flex;
    gap: 4px;
}

.chat-widget-actions button {
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s ease;
    font-size: 18px;
}

.chat-widget-actions button:hover {
    background: #374151;
    color: #e5e7eb;
}

/* Live Support Close Button (Phone Icon) - Red Color */
.chat-widget-live-support-close {
    color: #ef4444 !important;
}

.chat-widget-live-support-close:hover {
    background: #374151 !important;
    color: #f87171 !important;
}

/* Content Area */
.chat-widget-content {
    padding: 32px 20px 24px 20px;
    flex: 1;
    overflow-y: auto;
    background: #1f2937;
}

/* Feature Card */
.chat-feature-card {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.feature-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.feature-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: #1f2937;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.feature-status {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid #374151;
    border-radius: 50%;
}

.feature-info {
    flex: 1;
}

.feature-label {
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.feature-description {
    font-size: 14px;
    color: #e5e7eb;
    line-height: 1.5;
    margin-top: 4px;
}

.feature-cta-button {
    width: 100%;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.feature-cta-button:hover {
    background: #374151;
    transform: translateY(-1px);
}

/* Quick Actions */
.chat-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid #4b5563;
    border-radius: 16px;
    background: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-item:hover {
    background: #4b5563;
    border-color: #6b7280;
}

.quick-action-item .action-emoji {
    font-size: 20px;
    margin-right: 12px;
}

.quick-action-item .action-text {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #e5e7eb;
}

.quick-action-item i {
    color: #9ca3af;
}

/* Chat Messages Area */
.chat-widget-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    width: 100%;
    min-height: 0; /* Flexbox scroll fix */
    position: relative;
    overflow: hidden; /* Prevent body scroll */
}

.chat-widget-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #1f2937;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: calc(100vh - 200px); /* Ensure scrollable area */
    min-height: 200px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS smooth scrolling */
    position: relative;
    /* Scroll container'ı izole et */
    contain: layout style paint;
}

.chat-message {
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

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

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

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message .message-content {
    background: #1f2937;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: #374151;
    color: #e5e7eb;
    border: 1px solid #4b5563;
    border-bottom-left-radius: 4px;
}

/* Chat Input */
.chat-widget-input {
    padding: 20px;
    background: #111827;
    border-top: 1px solid #374151;
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
    position: relative;
    /* Input alanının scroll davranışını kontrol et */
    overflow: hidden;
}

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

.input-container textarea {
    width: 100%;
    border: 1px solid #4b5563;
    border-radius: 16px;
    padding: 12px 40px 12px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 44px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background: #374151;
    color: #e5e7eb;
}

.input-container textarea:focus {
    border-color: #6b7280;
}

.input-container textarea::placeholder {
    color: #9ca3af;
}

.attach-button {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: all 0.2s ease;
}

.attach-button:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.send-button {
    width: 44px;
    height: 44px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    /* Button tıklamasında scroll'u engelle */
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.send-button:hover {
    background: #374151;
}

/* Bottom Navigation */
.chat-widget-nav {
    padding: 12px 20px;
    background: #111827;
    border-top: 1px solid #374151;
    flex-shrink: 0;
}

.nav-container {
    display: flex;
    background: #374151;
    border-radius: 16px;
    padding: 8px;
    gap: 4px;
    margin-bottom: 8px;
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border: none;
    background: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #9ca3af;
}

.nav-item.active {
    background: #1f2937;
    color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.nav-item.active .nav-icon {
    background: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-label {
    font-size: 12px;
    font-weight: 600;
}

.powered-by {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
}

.powered-by .brand {
    font-weight: 600;
    color: #9ca3af;
}

/* Support Ticket Form Styling */
.support-ticket-form {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 16px;
    padding: 16px;
    margin: 8px 0;
}

.support-ticket-form h4 {
    margin: 0 0 16px 0;
    color: #e5e7eb;
    font-size: 16px;
    font-weight: 600;
}

.support-ticket-form .form-group {
    margin-bottom: 12px;
}

.support-ticket-form label {
    display: block;
    margin-bottom: 4px;
    color: #d1d5db;
    font-size: 13px;
    font-weight: 500;
}

.support-ticket-form input,
.support-ticket-form select,
.support-ticket-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #6b7280;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.15s ease-in-out;
    background: #1f2937;
    color: #e5e7eb;
}

.support-ticket-form input:focus,
.support-ticket-form select:focus,
.support-ticket-form textarea:focus {
    outline: none;
    border-color: #9ca3af;
}

.support-ticket-form textarea {
    resize: vertical;
    min-height: 80px;
}

.support-ticket-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.support-ticket-form .btn-cancel,
.support-ticket-form .btn-submit {
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
}

.support-ticket-form .btn-cancel {
    background-color: #4b5563;
    color: #d1d5db;
}

.support-ticket-form .btn-cancel:hover {
    background-color: #6b7280;
}

.support-ticket-form .btn-submit {
    background-color: #1f2937;
    color: white;
    flex: 1;
}

.support-ticket-form .btn-submit:hover {
    background-color: #374151;
}

.support-ticket-form .btn-submit:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
}

/* Order Details Styling */
.order-details-container {
    background: #374151;
    border: 1px solid #4b5563;
    border-radius: 16px;
    padding: 16px;
    margin: 8px 0;
}

.order-details-container h4 {
    color: #e5e7eb;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.order-details-container p {
    margin: 8px 0;
    color: #d1d5db;
    font-size: 14px;
    line-height: 1.4;
}

.order-link-container {
    margin: 12px 0;
    text-align: center;
}

.order-details-link {
    display: inline-block;
    background: #1f2937;
    color: white !important;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
}

.order-details-link:hover {
    background: #374151;
    transform: translateY(-1px);
    text-decoration: none;
    color: white !important;
}

.order-note {
    text-align: center;
    margin-top: 8px !important;
}

.order-note small {
    color: #9ca3af;
    font-size: 12px;
}

/* Help Panel Overlay */
.chat-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-help-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 480px) {
    .chat-widget-popup {
        width: 100vw;
        right: 0;
        bottom: 0;
        transition: transform 0.3s ease;
        /* Mobil scroll davranışını iyileştir */
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    
    .chat-widget-popup.keyboard-open {
        transform: translateY(-50vh);
    }
    
    .chat-widget-button {
        right: 10px;
        bottom: 10px;
    }
    
    .chat-widget-messages {
        max-height: calc(100vh - 250px);
        padding: 15px;
        /* Mobil scroll optimizasyonu */
        overscroll-behavior: contain;
        scroll-snap-type: none;
    }
    
    .chat-widget-input {
        padding: 15px;
        /* Mobil input scroll'unu engelle */
        position: sticky;
        bottom: 0;
    }
    
    .input-container textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 40px;
        /* Textarea scroll davranışını kontrol et */
        touch-action: manipulation;
    }
    
    .send-button {
        /* Mobil button davranışını iyileştir */
        touch-action: manipulation;
        -webkit-touch-callout: none;
    }
}

/* Mobil klavye açık durumu için özel stiller */
@media (max-width: 480px) and (max-height: 600px) {
    .chat-widget-popup {
        height: 100vh;
    }
    
    .chat-widget-messages {
        max-height: calc(100vh - 300px);
        flex: 1;
    }
    
    .chat-widget-content {
        padding: 20px 15px 15px 15px;
    }
}

/* Chat açık olduğunda body scroll'unu engelle - Kaldırıldı */
/* body.chat-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
} */

/* Chat widget messages alanının scroll davranışını iyileştir */
.chat-widget-messages:focus {
    outline: none;
}

/* Live Support Exit Modal Styles */
.live-support-exit-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.live-support-exit-modal.active {
    opacity: 1;
    visibility: visible;
}

.live-support-exit-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.live-support-exit-modal .modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s ease;
    text-align: center;
}

.live-support-exit-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.live-support-exit-modal .modal-header {
    margin-bottom: 25px;
}

.live-support-exit-modal .modal-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 24px;
}

.live-support-exit-modal h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px 0;
}

.live-support-exit-modal p {
    color: #7f8c8d;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.live-support-exit-modal .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.live-support-exit-modal .modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-width: 120px;
    justify-content: center;
}

.live-support-exit-modal .modal-btn-cancel {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
}

.live-support-exit-modal .modal-btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.live-support-exit-modal .modal-btn-confirm {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.live-support-exit-modal .modal-btn-confirm:hover {
    background: linear-gradient(135deg, #ee5a52, #dc4c64);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 90, 82, 0.3);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .live-support-exit-modal .modal-content {
        padding: 25px 20px;
        margin: 20px;
    }
    
    .live-support-exit-modal .modal-actions {
        flex-direction: column;
    }
    
    .live-support-exit-modal .modal-btn {
        width: 100%;
    }
}

/* Custom Scrollbar for Help Panel */
.chat-help-content::-webkit-scrollbar {
    width: 6px;
}

.chat-help-content::-webkit-scrollbar-track {
    background: #1f2937;
}

.chat-help-content::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 3px;
}

.chat-help-content::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

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

.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Light Mode Styles */
.chat-widget-container.light-mode .chat-widget-popup {
    background: #ffffff;
    color: #1f2937;
    border-color: #e5e7eb;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.chat-widget-container.light-mode .chat-widget-header,
.chat-widget-container.light-mode .chat-widget-nav {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .chat-widget-name {
    color: #111827;
}

.chat-widget-container.light-mode .chat-widget-status {
    color: #6b7280;
}

.chat-widget-container.light-mode .chat-widget-actions button {
    color: #6b7280;
}

.chat-widget-container.light-mode .chat-widget-actions button:hover {
    background: #e5e7eb;
    color: #374151;
}

.chat-widget-container.light-mode .chat-widget-content,
.chat-widget-container.light-mode .chat-widget-messages {
    background: #ffffff;
}

.chat-widget-container.light-mode .chat-feature-card {
    background: #f3f4f6;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-widget-container.light-mode .feature-avatar {
    background: #ffffff;
    color: #3b82f6;
}

.chat-widget-container.light-mode .feature-status {
    border-color: #f3f4f6;
}

.chat-widget-container.light-mode .feature-label {
    color: #6b7280;
}

.chat-widget-container.light-mode .feature-description {
    color: #374151;
}

.chat-widget-container.light-mode .feature-cta-button {
    background: #ffffff;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.chat-widget-container.light-mode .feature-cta-button:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.chat-widget-container.light-mode .quick-action-item {
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .quick-action-item:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

.chat-widget-container.light-mode .quick-action-item .action-text {
    color: #374151;
}

.chat-widget-container.light-mode .user-message .message-content {
    background: #eff6ff;
    color: #1e40af;
}

.chat-widget-container.light-mode .bot-message .message-content {
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .chat-widget-input {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .input-container textarea {
    background: #ffffff;
    color: #1f2937;
    border-color: #d1d5db;
}

.chat-widget-container.light-mode .input-container textarea:focus {
    border-color: #9ca3af;
}

.chat-widget-container.light-mode .send-button {
    background: #3b82f6;
    color: white;
}

.chat-widget-container.light-mode .send-button:hover {
    background: #2563eb;
}

.chat-widget-container.light-mode .nav-container {
    background: #f3f4f6;
}

.chat-widget-container.light-mode .nav-item {
    color: #6b7280;
}

.chat-widget-container.light-mode .nav-item.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-widget-container.light-mode .nav-item.active .nav-icon {
    background: #f3f4f6;
}

/* Light Mode Help Panel */
.chat-widget-container.light-mode .chat-help-panel {
    background: #ffffff;
    border-left-color: #e5e7eb;
}

.chat-widget-container.light-mode .chat-help-content::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.chat-widget-container.light-mode .chat-help-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
}

.chat-widget-container.light-mode .chat-help-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.chat-widget-container.light-mode .chat-help-welcome p {
    color: #6b7280;
}

.chat-widget-container.light-mode .chat-help-section h3 {
    color: #374151;
    border-bottom-color: #e5e7eb;
}

.chat-widget-container.light-mode .format-item {
    background: #f9fafb;
    color: #4b5563;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .format-item code {
    background: #e5e7eb;
    color: #2563eb;
}

.chat-widget-container.light-mode .command-list li {
    background: #f9fafb;
    color: #4b5563;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .command-list li:hover {
    border-color: #3b82f6;
}

.chat-widget-container.light-mode .chat-help-button {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #374151;
}

.chat-widget-container.light-mode .chat-help-button:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.chat-widget-container.light-mode .chat-message-btn {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.chat-widget-container.light-mode .chat-message-btn:hover {
    background-color: #e5e7eb;
    border-color: #d1d5db;
}

.chat-widget-container.light-mode .chat-message-btn.action-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
}

.chat-widget-container.light-mode .chat-message-btn.action-btn:hover {
    background-color: #2563eb;
}

/* Extracted from chat_widget.php */
/* Modern Help Panel */
.chat-help-panel {
    position: absolute;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 100%;
    height: 100%;
    background: #1f2937;
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid #374151;
}

.chat-help-panel.active {
    right: 0;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
}

.chat-help-header {
    padding: 20px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.chat-help-title {
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-help-close {
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.2s;
}

.chat-help-close:hover {
    background: rgba(255,255,255,0.3);
}

.chat-help-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.chat-help-welcome h4 {
    color: #60a5fa;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.chat-help-welcome p {
    color: #9ca3af;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.chat-help-section h3 {
    color: #e5e7eb;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #374151;
    padding-bottom: 8px;
}

.chat-help-section h3 i {
    color: #3b82f6;
}

.format-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.format-item {
    background: #111827;
    padding: 8px;
    border-radius: 8px;
    font-size: 12px;
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #374151;
}

.format-item code {
    background: #374151;
    padding: 2px 4px;
    border-radius: 4px;
    color: #60a5fa;
}

.command-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-list li {
    color: #d1d5db;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #111827;
    border-radius: 8px;
    border: 1px solid #374151;
    transition: all 0.2s;
}

.command-list li:hover {
    border-color: #60a5fa;
    transform: translateX(2px);
}

.command-list li i {
    color: #60a5fa;
}

.chat-help-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.chat-help-button {
    background: #374151;
    border: 1px solid #4b5563;
    color: #e5e7eb;
    padding: 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.chat-help-button:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.2);
}

.chat-help-button i {
    font-size: 16px;
}

