/* NP-Chat Widget Styles - Elementor Safe */
#np-chat-widget-container {
    position: fixed;
    z-index: 10000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#np-chat-widget-container * {
    box-sizing: border-box;
}

#np-chat-bubble {
    width: 60px;
    height: 60px;
    background: #007cba;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
    font-size: 24px;
    transition: transform 0.2s ease;
}

#np-chat-bubble:hover {
    transform: scale(1.05);
}

#np-chat-window {
    position: absolute;
    width: 420px;
    height: 650px;
    max-height: 80vh;
    min-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.np-chat-header {
    background: #007cba;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.np-chat-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.np-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
}

.np-chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
}

.np-chat-language-section {
    padding: 12px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.np-chat-language-selectors {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.np-chat-language-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.np-chat-language-group label {
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.np-chat-input-lang,
.np-chat-output-lang {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

.np-chat-voice-section {
    padding: 10px 15px;
    background: #f0f4ff;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.np-chat-input-method {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.method-option {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    font-size: 13px;
    transition: all 0.2s ease;
}

.method-option.active {
    border-color: #007cba;
    background-color: #e7f3ff;
}

.method-option.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.method-option input[type="radio"] {
    display: none;
}

.method-icon {
    font-size: 14px;
}

.np-voice-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.np-voice-btn.listening {
    background: #dc2626;
    animation: pulse 1.5s infinite;
}

.np-voice-status {
    margin-top: 5px;
    padding: 5px;
    background: white;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
    color: #2e7d32;
}

/* Messages Area - FIXED SCROLLING */
.np-chat-messages {
    flex: 1 1 auto;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 200px;
    max-height: none;
    height: auto;
}

/* Scrollbar styling */
.np-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.np-chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

.np-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #005a87;
}

.np-chat-message {
    display: flex;
}

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

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

.np-chat-message-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.np-chat-message.user .np-chat-message-bubble {
    background: #007cba;
    color: white;
    border-bottom-right-radius: 4px;
}

.np-chat-message.bot .np-chat-message-bubble {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    border-bottom-left-radius: 4px;
}

/* Upload Section */
.np-chat-upload-section {
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.np-upload-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.np-remove-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 18px;
    margin-left: 8px;
}

/* Input Area */
.np-chat-input-area {
    padding: 12px 15px;
    background: white;
    border-top: 1px solid #ddd;
    flex-shrink: 0;
}

.np-chat-input-row {
    display: flex;
    gap: 10px;
}

.np-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    min-height: 40px;
}

.np-chat-send {
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
}

.np-chat-send:hover {
    background: #005a87;
}

.np-chat-leave-message {
    margin-top: 10px;
}

.np-leave-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.np-leave-btn:hover {
    background: #218838;
}

/* Human Helper Button */
.np-chat-human-help {
    margin-top: 10px;
}

.np-human-btn {
    width: 100%;
    background: #6f42c1;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.np-human-btn:hover {
    background: #5a32a3;
}

.np-chat-login-prompt {
    margin-top: 10px;
    text-align: center;
}

.np-login-link {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.np-login-link:hover {
    text-decoration: underline;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220,38,38,0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220,38,38,0); }
    100% { box-shadow: 0 0 0 0 rgba(220,38,38,0); }
}

@media (max-width: 480px) {
    #np-chat-window {
        width: 95vw;
        right: 2.5vw;
        bottom: 70px;
        height: 80vh;
        min-height: 400px;
    }
}

/* ================================================================ */
/* FIX: Prevent NP-Chat from affecting Elementor video heights */
/* ================================================================ */

.elementor-widget-video,
.elementor-widget-video .elementor-widget-container,
.elementor-video,
.elementor-video-container,
.elementor-video-wrapper {
    height: auto !important;
    min-height: 200px !important;
    max-height: none !important;
    overflow: visible !important;
}

.elementor-widget-video iframe,
.elementor-video iframe,
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="vimeo.com"] {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
    min-height: 200px !important;
    max-height: none !important;
    position: relative !important;
    display: block !important;
}

.elementor-widget-video .elementor-video,
.elementor-widget-video .elementor-video video,
.elementor-widget-video .elementor-video iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 200px !important;
}

.elementor-widget-video .elementor-widget-container * {
    max-height: none !important;
    min-height: auto !important;
}

.elementor-element.elementor-widget-video {
    height: auto !important;
    min-height: 200px !important;
}

.elementor-widget-wrap .elementor-widget-video {
    height: auto !important;
}

.elementor-section .elementor-container .elementor-row .elementor-column .elementor-widget-video {
    height: auto !important;
}

/* ================================================================ */
/* Video embed inside chat messages */
/* ================================================================ */

.np-chat-message-bubble .video-embed {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    max-width: 100%;
}

.np-chat-message-bubble .video-embed iframe {
    width: 100%;
    height: 180px;
    border: none;
    max-width: 100%;
}

.np-chat-message-bubble .video-embed .video-caption {
    padding: 6px 12px;
    background: #1a1a2e;
    color: #fff;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 480px) {
    .np-chat-message-bubble .video-embed iframe {
        height: 120px;
    }
}


