/* NCL Chatbot Widget Styles */

#ncl-chatbot-fab {
    position: fixed;
    z-index: 9998;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #033f58 0%, #1ca4d3 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(28, 164, 211, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#ncl-chatbot-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(28, 164, 211, 0.6);
}

#ncl-chatbot-fab.active {
    transform: rotate(180deg);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(28, 164, 211, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(28, 164, 211, 0.7);
    }
}

#ncl-chatbot-fab.bottom-right {
    bottom: 20px;
    right: 20px;
}

#ncl-chatbot-fab.bottom-left {
    bottom: 20px;
    left: 20px;
}

#ncl-chatbot-widget {
    position: fixed;
    z-index: 9999;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

#ncl-chatbot-widget.visible {
    display: flex;
}

#ncl-chatbot-widget.bottom-right {
    bottom: 100px;
    right: 20px;
}

#ncl-chatbot-widget.bottom-left {
    bottom: 100px;
    left: 20px;
}

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

/* Header */
.ncl-chatbot-header {
    background: linear-gradient(135deg, #033f58 0%, #1ca4d3 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 16px 16px 0 0;
}

.ncl-chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 17px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ncl-chatbot-header-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ncl-chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.ncl-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Messages Container */
.ncl-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.ncl-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ncl-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.ncl-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Message Bubbles */
.ncl-chatbot-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease-out;
    font-size: 15px;
    letter-spacing: 0.3px;
}

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

.ncl-chatbot-message.bot {
    align-self: flex-start;
    background: #3a3a3a;
    color: #e0e0e0;
    border: 1px solid #505050;
    border-bottom-left-radius: 4px;
    font-weight: 500;
    line-height: 1.6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.ncl-chatbot-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #1ca4d3 0%, #1584b3 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    font-weight: 500;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-shadow: 0 2px 4px rgba(28, 164, 211, 0.3);
}

.ncl-chatbot-message strong {
    display: block;
    margin-bottom: 4px;
}

.ncl-chatbot-message-time {
    font-size: 11px;
    opacity: 0.65;
    margin-top: 6px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Typing Indicator */
.ncl-chatbot-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    background: #f0f0f0;
    border-radius: 16px;
    align-self: flex-start;
    max-width: 80px;
}

.ncl-chatbot-typing-dot {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.ncl-chatbot-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.ncl-chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

/* Quick Replies */
.ncl-chatbot-quick-replies {
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #1a1a1a;
    border-top: 1px solid #333333;
}

.ncl-chatbot-quick-reply {
    padding: 8px 16px;
    background: #2d2d2d;
    border: 2px solid #1ca4d3;
    color: #1ca4d3;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.ncl-chatbot-quick-reply:hover {
    background: linear-gradient(135deg, #1ca4d3 0%, #1584b3 100%);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(28, 164, 211, 0.5);
}

/* Input Area */
.ncl-chatbot-input-area {
    padding: 16px 20px;
    background: #1a1a1a;
    border-top: 1px solid #333333;
    display: flex;
    gap: 12px;
    align-items: center;
}

.ncl-chatbot-input {
    flex: 1;
    border: 2px solid #404040;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 14px;
    color: #ffffff;
    background: #2d2d2d;
    outline: none;
    transition: all 0.2s;
    font-weight: 500;
}

.ncl-chatbot-input:focus {
    border-color: #1ca4d3;
    box-shadow: 0 0 0 3px rgba(28, 164, 211, 0.2);
}

.ncl-chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #033f58 0%, #1ca4d3 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: transform 0.2s;
}

.ncl-chatbot-send:hover {
    transform: scale(1.1);
}

.ncl-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Branding */
.ncl-chatbot-branding {
    padding: 8px 20px;
    text-align: center;
    font-size: 11px;
    color: #888888;
    background: #1a1a1a;
    border-top: 1px solid #333333;
    font-weight: 500;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #ncl-chatbot-widget {
        width: calc(100vw - 20px);
        height: calc(100vh - 180px);
        max-height: calc(100vh - 180px);
        bottom: 90px !important;
        right: 10px !important;
        left: 10px !important;
        border-radius: 12px;
    }
    
    #ncl-chatbot-fab {
        width: 56px;
        height: 56px;
        font-size: 22px;
        bottom: 85px !important;
        z-index: 9997;
    }
    
    #ncl-chatbot-fab.bottom-right {
        right: 15px !important;
    }
    
    #ncl-chatbot-fab.bottom-left {
        left: 15px !important;
    }
    
    .ncl-chatbot-messages {
        padding: 15px;
    }
    
    .ncl-chatbot-message {
        max-width: 85%;
        font-size: 14px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    #ncl-chatbot-fab,
    #ncl-chatbot-widget,
    .ncl-chatbot-message,
    .ncl-chatbot-quick-reply,
    .ncl-chatbot-send {
        animation: none;
        transition: none;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    #ncl-chatbot-widget {
        background: #1e1e1e;
    }
    
    .ncl-chatbot-messages {
        background: #2d2d2d;
    }
    
    .ncl-chatbot-message.bot {
        background: #3a3a3a;
        color: #e0e0e0;
    }
    
    .ncl-chatbot-input-area,
    .ncl-chatbot-branding {
        background: #1e1e1e;
        border-color: #444;
    }
    
    .ncl-chatbot-input {
        background: #2d2d2d;
        color: #e0e0e0;
        border-color: #444;
    }
    
    .ncl-chatbot-quick-reply {
        background: #2d2d2d;
        border-color: #1ca4d3;
    }
}
