/* ===== CHATBOT CSS - ASYMMETRIC ESSENTIALISM ===== */
:root {
    --cb-cyan: #06b6d4;
    --cb-cyan-dark: #0891b2;
    --cb-slate-950: #020617;
    --cb-slate-900: #0f172a;
    --cb-slate-800: #1e293b;
    --cb-slate-700: #334155;
    --cb-slate-600: #475569;
    --cb-slate-500: #64748b;
    --cb-slate-400: #94a3b8;
    --cb-slate-200: #e2e8f0;
    --cb-green: #22c55e;
    --cb-font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

/* Container */
#lns-chatbot-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: var(--cb-font);
}

/* FAB Button */
#lns-chatbot-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--cb-cyan);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

#lns-chatbot-fab:hover {
    transform: scale(1.08);
    background: var(--cb-cyan-dark);
}

#lns-chatbot-fab svg {
    width: 28px;
    height: 28px;
    fill: white;
    transition: transform 0.3s ease;
}

#lns-chatbot-fab.open svg {
    transform: rotate(90deg);
}

/* Chat Window */
#lns-chatbot-window {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 380px;
    max-width: 90vw;
    height: 550px;
    max-height: 75vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 32px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow:
        0 25px 50px -12px rgba(0, 0, 0, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    animation: chatSlideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#lns-chatbot-window.visible {
    display: flex;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Header */
#lns-chatbot-header {
    background: rgba(2, 6, 23, 0.4);
    padding: 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    backdrop-filter: blur(10px);
}

#lns-chatbot-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(6, 182, 212, 0.05);
    border-bottom-left-radius: 60px;
    pointer-events: none;
}

.cb-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1;
}

.cb-avatar {
    width: 42px;
    height: 42px;
    background: var(--cb-cyan);
    border-radius: 12px 12px 12px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
}

.cb-avatar svg {
    width: 22px;
    height: 22px;
    fill: white;
}

.cb-header-text h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.cb-status {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
}

.cb-status-dot {
    width: 6px;
    height: 6px;
    background: var(--cb-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.cb-status span {
    font-size: 9px;
    color: var(--cb-slate-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

#lns-chatbot-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--cb-slate-400);
    transition: color 0.2s;
    z-index: 1;
}

#lns-chatbot-close:hover {
    color: white;
}

#lns-chatbot-close svg {
    width: 18px;
    height: 18px;
}

/* Messages Area */
#lns-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#lns-chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

#lns-chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--cb-slate-700);
    border-radius: 4px;
}

.cb-message {
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: messageIn 0.25s ease-out;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cb-message.bot {
    align-self: flex-start;
}

.cb-message.user {
    align-self: flex-end;
}

.cb-message-content {
    padding: 14px 18px;
    font-size: 13px;
    line-height: 1.6;
    border-radius: 18px;
}

.cb-message.bot .cb-message-content {
    background: rgba(30, 41, 59, 0.5);
    color: var(--cb-slate-200);
    border-top-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}

.cb-message.user .cb-message-content {
    background: linear-gradient(135deg, var(--cb-cyan), var(--cb-cyan-dark));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.3);
}

.cb-message-time {
    font-size: 9px;
    color: var(--cb-slate-500);
    margin-top: 5px;
    font-family: monospace;
}

.cb-message.user .cb-message-time {
    text-align: right;
}

/* Suggestions */
#lns-chatbot-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 15px;
}

.cb-suggestion-btn {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid var(--cb-cyan);
    color: var(--cb-cyan);
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--cb-font);
    font-weight: 500;
}

.cb-suggestion-btn:hover {
    background: var(--cb-cyan);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Footer / Input */
#lns-chatbot-footer {
    background: var(--cb-slate-950);
    padding: 16px;
    border-top: 1px solid var(--cb-slate-800);
}

.cb-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#lns-chatbot-input {
    flex: 1;
    background: var(--cb-slate-900);
    border: 1px solid var(--cb-slate-800);
    border-radius: 16px;
    padding: 14px 16px;
    color: white;
    font-size: 13px;
    font-family: var(--cb-font);
    resize: none;
    min-height: 48px;
    max-height: 100px;
    outline: none;
    transition: border-color 0.2s;
}

#lns-chatbot-input::placeholder {
    color: var(--cb-slate-600);
}

#lns-chatbot-input:focus {
    border-color: var(--cb-cyan);
}

#lns-chatbot-send {
    width: 48px;
    height: 48px;
    background: var(--cb-cyan);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.1s;
    flex-shrink: 0;
}

#lns-chatbot-send:hover {
    background: var(--cb-cyan-dark);
}

#lns-chatbot-send:active {
    transform: scale(0.95);
}

#lns-chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.cb-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding: 0 4px;
}

.cb-call-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--cb-slate-500);
    text-decoration: none;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    transition: color 0.2s;
}

.cb-call-link:hover {
    color: var(--cb-cyan);
}

.cb-call-link svg {
    width: 10px;
    height: 10px;
}

.cb-powered {
    font-size: 9px;
    color: var(--cb-slate-700);
}

/* Typing Indicator */
.cb-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--cb-slate-800);
    border-radius: 18px;
    border-top-left-radius: 4px;
    max-width: fit-content;
    border: 1px solid var(--cb-slate-700);
}

.cb-typing-dots {
    display: flex;
    gap: 4px;
}

.cb-typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--cb-cyan);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.cb-typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.cb-typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.cb-typing-text {
    font-size: 10px;
    color: var(--cb-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: monospace;
}

/* Message Links */
.cb-message-content a {
    color: var(--cb-cyan);
    text-decoration: underline;
    font-weight: 600;
}

.cb-message-content a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 480px) {
    #lns-chatbot-window {
        width: calc(100vw - 32px);
        height: 70vh;
        bottom: 70px;
        right: -8px;
    }

    #lns-chatbot-fab {
        width: 54px;
        height: 54px;
    }
}

/* ===== MOBILE TOUCH STATES ===== */
/* Active states for touch devices (mobile tap feedback) */

#lns-chatbot-fab:active {
    transform: scale(0.95);
    background: var(--cb-cyan-dark);
}

#lns-chatbot-send:active {
    transform: scale(0.9);
    background: var(--cb-cyan-dark);
}

.cb-suggestion-btn:active {
    border-color: var(--cb-cyan);
    color: var(--cb-cyan);
    background: rgba(6, 182, 212, 0.1);
}

.cb-call-link:active {
    color: var(--cb-cyan);
}

.cb-message-content a:active {
    color: white;
}

#lns-chatbot-close:active {
    color: white;
}

/* Ensure smooth transitions for touch */
#lns-chatbot-fab,
#lns-chatbot-send,
.cb-suggestion-btn,
.cb-call-link,
#lns-chatbot-close {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}