/* FT-Services AI Chatbot - Seamless Native Design */

.chatbot-container {
    background: transparent;
    margin-top: 40px;
    width: 100%;
    border: 2px solid #23326B;
    border-radius: 20px;
    padding: 24px;
    overflow: visible;
}

.chatbot-header {
    display: none;
}

.chatbot-messages {
    min-height: 150px;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: transparent;
    overflow: visible;
}

.chat-message {
    max-width: 70%;
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    animation: messageSlide 0.3s ease;
    font-family: 'DM Sans', sans-serif;
}

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

.chat-message.bot {
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    align-self: flex-start;
    border-radius: 4px 20px 20px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Markdown formatting in bot messages */
.chat-message.bot ul,
.chat-message.bot ol {
    margin: 8px 0;
    padding-left: 20px;
}

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

.chat-message.bot p {
    margin: 8px 0;
}

.chat-message.bot p:first-child {
    margin-top: 0;
}

.chat-message.bot p:last-child {
    margin-bottom: 0;
}

.chat-message.bot strong {
    font-weight: 600;
    color: #23326B;
}

.chat-message.bot code {
    background: rgba(35, 50, 107, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.chat-message.bot a {
    color: #23326B;
    text-decoration: underline;
}

.chat-message.user {
    background: #23326B;
    color: white;
    align-self: flex-end;
    border-radius: 20px 4px 20px 20px;
    box-shadow: 0 2px 12px rgba(35, 50, 107, 0.3);
}

.chat-message.bot.welcome {
    background: rgba(255, 255, 255, 0.98);
    max-width: 85%;
}

.chat-message.typing {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
}

.thinking-status {
    font-size: 14px;
    color: #23326B;
    font-style: italic;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.typing-dot {
    width: 10px;
    height: 10px;
    background: #23326B;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

.chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0 20px;
    background: transparent;
}

.suggestion-chip {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(35, 50, 107, 0.15);
    border-radius: 25px;
    font-size: 13px;
    color: #23326B;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
}

.suggestion-chip:hover {
    background: #23326B;
    color: white;
    border-color: #23326B;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(35, 50, 107, 0.25);
}

.chatbot-input-area {
    padding: 0;
    background: transparent;
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.chatbot-input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid rgba(35, 50, 107, 0.15);
    border-radius: 30px;
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    background: rgba(255, 255, 255, 0.95);
    transition: all 0.2s;
}

.chatbot-input:focus {
    outline: none;
    border-color: #23326B;
    background: white;
    box-shadow: 0 4px 20px rgba(35, 50, 107, 0.15);
}

.chatbot-input::placeholder {
    color: #64748b;
}

.chatbot-send {
    width: 52px;
    height: 52px;
    background: #23326B;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(35, 50, 107, 0.4);
}

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

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.chatbot-send svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
    stroke-width: 2;
}


/* Lead Capture Form */
.chat-lead-form {
    background: rgba(181, 101, 118, 0.08);
    border: 1px solid #B56576;
    border-radius: 12px;
    padding: 20px;
    margin: 8px 0;
    max-width: 320px;
    animation: messageSlide 0.3s ease;
}

.chat-lead-form h4 {
    color: #23326B;
    font-size: 15px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.chat-lead-form .form-group {
    margin-bottom: 12px;
}

.chat-lead-form label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
    font-weight: 500;
}

.chat-lead-form input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(181, 101, 118, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    background: white;
    transition: all 0.2s;
    box-sizing: border-box;
}

.chat-lead-form input:focus {
    outline: none;
    border-color: #B56576;
    box-shadow: 0 0 0 3px rgba(181, 101, 118, 0.1);
}

.chat-lead-form input::placeholder {
    color: #94a3b8;
}

.chat-lead-form .form-status {
    text-align: center;
    font-size: 13px;
    color: #B56576;
    margin-top: 8px;
}

/* Rating Form */
.chat-rating-form {
    background: rgba(181, 101, 118, 0.08);
    border: 1px solid #B56576;
    border-radius: 12px;
    padding: 20px;
    margin: 8px 0;
    max-width: 280px;
    animation: messageSlide 0.3s ease;
}

.chat-rating-form h4 {
    color: #23326B;
    font-size: 14px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.rating-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rating-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.rating-option:hover {
    background: rgba(181, 101, 118, 0.1);
}

.rating-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #B56576;
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.rating-option input[type="radio"]:checked {
    background: #B56576;
    border-color: #B56576;
}

.rating-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.rating-option label {
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
}

.rating-submit {
    width: 100%;
    padding: 10px;
    background: #B56576;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.rating-submit:hover {
    background: #9d4a5a;
}

.rating-thanks {
    text-align: center;
    color: #B56576;
    font-size: 14px;
    padding: 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .chatbot-container {
        margin-top: 32px;
    }

    .chatbot-messages {
        min-height: 120px;
    }

    .chat-message {
        max-width: 85%;
        font-size: 14px;
        padding: 14px 18px;
    }

    .suggestion-chip {
        font-size: 12px;
        padding: 8px 14px;
    }

    .chatbot-input {
        padding: 14px 20px;
        font-size: 14px;
    }

    .chatbot-send {
        width: 48px;
        height: 48px;
    }
}
