/* CTH Urbana AI Chatbot Styles */
:root {
    --ct-chatbot-primary: #052e3b;
    /* Replicating project theme color */
    --ct-chatbot-secondary: #0a4d5e;
    --ct-chatbot-accent: #0ec2c2;
    --ct-chatbot-text-dark: #1f2937;
    --ct-chatbot-text-light: #ffffff;
    --ct-chatbot-glass-bg: rgba(255, 255, 255, 0.75);
    --ct-chatbot-glass-border: rgba(255, 255, 255, 0.4);
    --ct-chatbot-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    --ct-chatbot-radius: 18px;
    --ct-chatbot-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Floating Trigger */
#ct-chatbot-trigger {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 75px;
    height: 75px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

#ct-chatbot-trigger:hover {
    transform: scale(1.08);
}

#ct-chatbot-trigger dotlottie-player {
    width: 100%;
    height: 100%;
}

/* Chatbot Modal */
#ct-chatbot-modal {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 420px;
    height: 620px;
    max-height: 85vh;
    z-index: 9998;
    background: var(--ct-chatbot-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--ct-chatbot-glass-border);
    border-radius: var(--ct-chatbot-radius);
    box-shadow: var(--ct-chatbot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--ct-chatbot-transition);
}

#ct-chatbot-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.ct-chatbot-header {
    background: var(--ct-chatbot-primary);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

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

.ct-chatbot-header-lottie {
    width: 50px;
    height: 50px;
}

.ct-chatbot-brand-info {
    display: flex;
    flex-direction: column;
}

.ct-chatbot-brand-name {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}

.ct-chatbot-brand-status {
    font-size: 11px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ct-chatbot-status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}

.ct-chatbot-header-actions {
    display: flex;
    gap: 10px;
}

.ct-chatbot-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    transition: opacity 0.2s ease;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ct-chatbot-btn:hover {
    opacity: 0.7;
}

/* Descriptions Overlay */
.ct-chatbot-intro-overlay {
    padding: 10px 20px;
    background: rgba(5, 46, 59, 0.05);
    font-size: 11px;
    line-height: 1.4;
    color: var(--ct-chatbot-primary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 500;
}

/* Chat Messages Area */
.ct-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

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

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

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

/* Message Bubbles */
.ct-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: var(--ct-chatbot-radius);
    font-size: 13.5px;
    line-height: 1.5;
    position: relative;
    animation: ct-fade-in 0.3s ease forwards;
}

/* Suggestions / Quick Questions */
.ct-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ct-suggestion-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--ct-chatbot-primary);
    color: var(--ct-chatbot-primary);
    padding: 8px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.ct-suggestion-btn:hover {
    background: var(--ct-chatbot-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(5, 46, 59, 0.2);
}

@keyframes ct-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ct-bot-message {
    align-self: flex-start;
    background: white;
    color: var(--ct-chatbot-text-dark);
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.ct-user-message {
    align-self: flex-end;
    background: var(--ct-chatbot-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.ct-timestamp {
    font-size: 9px;
    opacity: 0.5;
    margin-top: 4px;
    text-align: right;
}

/* Typing Indicator */
.ct-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    align-self: flex-start;
    border-radius: 20px;
    border-bottom-left-radius: 4px;
}

.ct-typing span {
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    animation: ct-bounce 1.4s infinite ease-in-out;
}

.ct-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ct-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes ct-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Product Card */
.ct-product-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--ct-chatbot-primary);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ct-product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ct-product-name {
    font-weight: 700;
    color: var(--ct-chatbot-primary);
}

.ct-product-cas {
    font-size: 11px;
    background: #eee;
    padding: 2px 6px;
    border-radius: 40px;
}

.ct-product-desc {
    font-size: 12px;
    color: #4b5563;
}

.ct-product-link {
    font-size: 12px;
    font-weight: 600;
    color: var(--ct-chatbot-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.ct-product-link:hover {
    text-decoration: underline;
}

/* Input Area */
.ct-chatbot-input-area {
    padding: 16px 20px;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 10px;
    align-items: center;
}

.ct-chatbot-input {
    flex: 1;
    border: 1.5px solid #eee;
    border-radius: 12px;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ct-chatbot-input:focus {
    border-color: var(--ct-chatbot-primary);
    box-shadow: 0 0 0 3px rgba(5, 46, 59, 0.1);
}

.ct-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--ct-chatbot-primary);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ct-send-btn:hover {
    background: var(--ct-chatbot-secondary);
    transform: scale(1.05);
}

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

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #ct-chatbot-modal {
        width: calc(100% - 40px);
        height: 500px;
        right: 20px;
        bottom: 90px;
    }
}