/**
 * Chatbot Widget Styles
 * 
 * @package CursorTheme
 */

/* Chatbot Toggle Button */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #E63946;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9997;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(230, 57, 70, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(230, 57, 70, 0.5);
}

.chatbot-toggle svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chatbot Widget */
.chatbot-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #161719;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-widget.active {
    display: flex;
}

/* Chatbot Header */
.chatbot-header {
    background: #E63946;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 20px 20px 0 0;
}

.chatbot-header h3 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.chatbot-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.chatbot-close:hover {
    opacity: 0.8;
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chatbot-message {
    display: flex;
    margin-bottom: 10px;
}

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

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

.chatbot-message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chatbot-message-bot .chatbot-message-content {
    background: #2a2a2a;
    color: white;
    border-radius: 18px 18px 18px 4px;
}

.chatbot-message-user .chatbot-message-content {
    background: #E63946;
    color: white;
    border-radius: 18px 18px 4px 18px;
}

/* Chatbot Buttons */
.chatbot-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.chatbot-button {
    background: #2a2a2a;
    color: white;
    border: 2px solid #E63946;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: left;
}

.chatbot-button:hover {
    background: #E63946;
    transform: translateX(5px);
}

.chatbot-restart {
    margin-top: 20px;
    background: #E63946;
    border-color: #E63946;
    text-align: center;
}

/* Chatbot Input Container */
.chatbot-input-container {
    padding: 15px 20px;
    background: #212121;
    border-top: 1px solid #333;
    display: none;
    gap: 10px;
    align-items: center;
}

.chatbot-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #161719;
    border: 2px solid #333;
    border-radius: 25px;
    padding: 8px 15px;
}

#chatbot-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 14px;
    outline: none;
    padding: 0;
}

#chatbot-input::placeholder {
    color: #666;
}

.chatbot-send {
    background: #E63946;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    padding: 0;
}

.chatbot-send:hover {
    background: #d62839;
    transform: scale(1.1);
}

.chatbot-send svg {
    width: 18px;
    height: 18px;
}

.chatbot-skip {
    background: transparent;
    border: 1px solid #666;
    color: #999;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.chatbot-skip:hover {
    border-color: #999;
    color: white;
}

/* Chatbot Results */
.chatbot-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.chatbot-result-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #2a2a2a;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.chatbot-result-item:hover {
    border-color: #E63946;
    transform: translateX(5px);
}

.chatbot-result-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #161719;
}

.chatbot-result-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-result-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chatbot-result-info h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.chatbot-result-rating {
    font-size: 12px;
    color: #E63946;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .chatbot-widget {
        width: calc(100vw - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
        right: 20px;
        left: 20px;
        max-width: none;
        max-height: none;
    }
    
    .chatbot-toggle {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
}

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

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

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

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

/* Chatbot Notification Badge */
.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #222222;
    font-size: 12px;
    font-weight: 700;
    z-index: 9999;
    animation: pulse 2s infinite;
}

.chatbot-badge.hidden {
    display: none;
}

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

/* Chatbot Welcome Pop-up */
.chatbot-welcome-popup {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.3s ease-out;
}

.chatbot-welcome-popup.active {
    display: flex;
}

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

.chatbot-welcome-content {
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.chatbot-welcome-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E63946;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chatbot-welcome-avatar img {
    width: 80%;
    height: 80%;
    object-fit: cover;
}

.chatbot-welcome-message-wrapper {
    flex: 1;
    min-width: 0;
}

.chatbot-welcome-message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.chatbot-welcome-name {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.chatbot-welcome-time {
    color: #999;
    font-size: 12px;
    margin: 0;
}

.chatbot-welcome-message {
    padding: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.chatbot-welcome-close {
    background: transparent;
    border: none;
    color: #999;
    font-size: 24px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

.chatbot-welcome-close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .chatbot-welcome-popup {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}



