/* ResoluteConcepts Chatbot Widget Styles */

#chatbotContainer {
    --chat-primary: #0ea5e9;
    --chat-accent: #06b6d4;
    --chat-dark: #0f172a;
    --chat-dark-light: #1e293b;
    --chat-gray: #64748b;
    --chat-gray-light: #94a3b8;
    --chat-white: #ffffff;
}

/* Floating Trigger Button */
.chatbot-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.chatbot-trigger svg {
    width: 28px;
    height: 28px;
    color: var(--chat-white);
    transition: all 0.3s ease;
}

.chatbot-trigger .trigger-chat {
    opacity: 1;
    transform: scale(1);
}

.chatbot-trigger .trigger-close {
    position: absolute;
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

.chatbot-trigger.open .trigger-chat {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.chatbot-trigger.open .trigger-close {
    opacity: 1;
    transform: scale(1) rotate(0);
}

.trigger-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    background: #ef4444;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

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

/* Chat Widget */
.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    height: 520px;
    background: var(--chat-dark);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.chatbot-widget.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.chatbot-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-avatar svg {
    width: 22px;
    height: 22px;
    color: var(--chat-white);
}

.chatbot-title {
    display: flex;
    flex-direction: column;
}

.chatbot-name {
    font-weight: 600;
    color: var(--chat-white);
    font-size: 15px;
}

.chatbot-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chatbot-close {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.chatbot-close svg {
    width: 18px;
    height: 18px;
    color: var(--chat-white);
}

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--chat-dark-light);
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

/* Welcome Screen */
.chatbot-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    height: 100%;
}

.welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.welcome-icon svg {
    width: 32px;
    height: 32px;
    color: var(--chat-white);
}

.chatbot-welcome h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--chat-white);
    margin-bottom: 8px;
}

.chatbot-welcome p {
    font-size: 14px;
    color: var(--chat-gray-light);
    margin-bottom: 24px;
    line-height: 1.6;
}

.chatbot-start {
    padding: 12px 28px !important;
    font-size: 14px !important;
}

/* Message Bubbles */
.message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: messageIn 0.3s ease;
}

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

.message-bot {
    align-self: flex-start;
}

.message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-avatar svg {
    width: 16px;
    height: 16px;
    color: var(--chat-white);
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message-bot .message-content {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--chat-white);
    border-top-left-radius: 4px;
}

.message-user .message-content {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    color: var(--chat-white);
    border-top-right-radius: 4px;
}

.message-content ul {
    margin: 8px 0;
    padding-left: 16px;
}

.message-content li {
    margin: 4px 0;
}

.message-content a {
    color: var(--chat-accent);
    text-decoration: underline;
}

.message-content strong {
    font-weight: 600;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--chat-gray);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

/* Input Area */
.chatbot-input-area {
    padding: 16px;
    background: var(--chat-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    background: var(--chat-dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 4px;
}

.chatbot-input-wrapper:focus-within {
    border-color: var(--chat-primary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

#chatbotInput {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px;
    font-size: 14px;
    color: var(--chat-white);
    outline: none;
    font-family: inherit;
}

#chatbotInput::placeholder {
    color: var(--chat-gray);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-accent));
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.chatbot-send:active {
    transform: scale(0.95);
}

.chatbot-send svg {
    width: 20px;
    height: 20px;
    color: var(--chat-white);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chatbot-widget {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .chatbot-trigger {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .chatbot-trigger svg {
        width: 24px;
        height: 24px;
    }
}

/* Inline Chat Option (for contact section) */
.chat-inline {
    background: var(--chat-dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-inline .chatbot-header {
    padding: 14px 18px;
}

.chat-inline .chatbot-messages {
    background: rgba(0, 0, 0, 0.2);
}

.chat-inline .chatbot-close {
    display: none;
}
