/* =========================================================
   LUCID GLOBAL ELECTRONICS CHATBOT
   ========================================================= */

:root {

    --lucid-chat-primary: #111827;
    --lucid-chat-primary-light: #1f2937;

    --lucid-chat-accent: #2563eb;
    --lucid-chat-accent-hover: #1d4ed8;

    --lucid-chat-bg: #f8fafc;
    --lucid-chat-white: #ffffff;

    --lucid-chat-text: #111827;
    --lucid-chat-muted: #6b7280;

    --lucid-chat-border: #e5e7eb;

    --lucid-chat-user: #2563eb;
    --lucid-chat-bot: #f3f4f6;

}


/* =========================================================
   FLOATING BUTTON
   ========================================================= */

.lucid-chat-float {

    position: fixed;

    right: 24px;
    bottom: 24px;

    width: 62px;
    height: 62px;

    border: none;
    border-radius: 50%;

    background: var(--lucid-chat-primary);

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.35rem;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.18);

    z-index: 9998;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;

}


.lucid-chat-float:hover {

    transform: translateY(-4px);

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.25);

}


/* Notification */

.lucid-chat-notification {

    position: absolute;

    top: -3px;
    right: -3px;

    width: 20px;
    height: 20px;

    background: #ef4444;

    color: #ffffff;

    border-radius: 50%;

    font-size: 0.7rem;
    font-weight: 700;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 2px solid #ffffff;

}


/* =========================================================
   CHAT WINDOW
   ========================================================= */
/* =========================================================
   CHAT WINDOW
   ========================================================= */

.lucid-chatbot {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 390px;
    max-width: calc(100vw - 32px);
    height: 650px;
    max-height: calc(100vh - 130px);

    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--lucid-chat-border);

    z-index: 9999;

    opacity: 0;
    visibility: hidden;

    transform: translateY(20px) scale(0.97);
    transform-origin: bottom right;

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.lucid-chatbot.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}


/* =========================================================
   HEADER
   ========================================================= */

.lucid-chat-header {

    background: var(--lucid-chat-primary);

    color: #ffffff;

    padding: 16px 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    flex-shrink: 0;

}


.lucid-chat-brand {

    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;

}


.lucid-chat-avatar {

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 50%;

    background: rgba(255,255,255,0.12);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1rem;

}


.lucid-chat-brand-text {

    display: flex;

    flex-direction: column;

    min-width: 0;

}


.lucid-chat-brand-text strong {

    font-size: 0.95rem;

    font-weight: 700;

    line-height: 1.2;

}


.lucid-chat-brand-text span {

    font-size: 0.72rem;

    color: rgba(255,255,255,0.7);

    margin-top: 2px;

}


.lucid-chat-brand-text small {

    display: flex;

    align-items: center;

    gap: 5px;

    margin-top: 3px;

    font-size: 0.68rem;

    color: rgba(255,255,255,0.8);

}


.lucid-online-dot {

    width: 7px !important;
    height: 7px !important;

    display: inline-block !important;

    border-radius: 50%;

    background: #22c55e;

}


/* Header Buttons */

.lucid-chat-header-actions {

    display: flex;

    gap: 5px;

}


.lucid-chat-header-btn {

    width: 34px;
    height: 34px;

    border: none;

    border-radius: 8px;

    background: transparent;

    color: rgba(255,255,255,0.75);

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background 0.2s ease,
        color 0.2s ease;

}


.lucid-chat-header-btn:hover {

    background: rgba(255,255,255,0.1);

    color: #ffffff;

}


/* =========================================================
   CHAT BODY
   ========================================================= */

.lucid-chat-body {

    flex: 1;

    overflow-y: auto;

    background: var(--lucid-chat-bg);

    position: relative;

}


.lucid-chat-body::-webkit-scrollbar {

    width: 6px;

}


.lucid-chat-body::-webkit-scrollbar-thumb {

    background: #d1d5db;

    border-radius: 20px;

}


/* =========================================================
   WELCOME SCREEN
   ========================================================= */

.lucid-welcome-screen {

    padding: 28px 20px 25px;

}


.lucid-welcome-icon {

    width: 52px;
    height: 52px;

    border-radius: 15px;

    background: #eff6ff;

    color: var(--lucid-chat-accent);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.25rem;

    margin-bottom: 15px;

}


.lucid-welcome-screen h3 {

    margin: 0 0 8px;

    color: var(--lucid-chat-text);

    font-size: 1.15rem;

    line-height: 1.35;

}


.lucid-welcome-screen > p {

    margin: 0;

    color: var(--lucid-chat-muted);

    font-size: 0.84rem;

    line-height: 1.55;

}


.lucid-topic-heading {

    margin-top: 20px !important;

    margin-bottom: 10px !important;

    font-weight: 700;

    color: var(--lucid-chat-text) !important;

}


/* =========================================================
   TOPICS
   ========================================================= */

.lucid-topic-list {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

}


.lucid-topic-btn {

    border: 1px solid var(--lucid-chat-border);

    background: #ffffff;

    border-radius: 11px;

    padding: 11px 10px;

    display: flex;

    align-items: center;

    gap: 8px;

    text-align: left;

    cursor: pointer;

    color: var(--lucid-chat-text);

    font-size: 0.75rem;

    line-height: 1.25;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;

}


.lucid-topic-btn i {

    width: 20px;

    color: var(--lucid-chat-accent);

    flex-shrink: 0;

}


.lucid-topic-btn:hover {

    border-color: #93c5fd;

    background: #eff6ff;

    transform: translateY(-1px);

}


/* =========================================================
   MESSAGES
   ========================================================= */

.lucid-chat-messages {

    padding: 18px;

    display: flex;

    flex-direction: column;

    gap: 12px;

}


.lucid-message {

    display: flex;

    width: 100%;

    animation: lucidMessageIn 0.25s ease;

}


@keyframes lucidMessageIn {

    from {

        opacity: 0;

        transform: translateY(5px);

    }

    to {

        opacity: 1;

        transform: translateY(0);

    }

}


.lucid-message.user {

    justify-content: flex-end;

}


.lucid-message.bot {

    justify-content: flex-start;

}


.lucid-message-content {

    max-width: 85%;

    padding: 11px 13px;

    border-radius: 14px;

    font-size: 0.84rem;

    line-height: 1.55;

    overflow-wrap: break-word;

}


.lucid-message.bot .lucid-message-content {

    background: var(--lucid-chat-bot);

    color: var(--lucid-chat-text);

    border-bottom-left-radius: 4px;

}


.lucid-message.user .lucid-message-content {

    background: var(--lucid-chat-user);

    color: #ffffff;

    border-bottom-right-radius: 4px;

}


/* Lists inside chatbot */

.lucid-message-content ul {

    margin: 8px 0 4px;

    padding-left: 18px;

}


.lucid-message-content li {

    margin-bottom: 4px;

}


.lucid-message-content strong {

    font-weight: 700;

}


/* =========================================================
   QUICK RECOMMENDATION BUTTONS
   ========================================================= */

.lucid-suggestion-container {

    display: flex;

    flex-wrap: wrap;

    gap: 6px;

    margin-top: 9px;

}


.lucid-suggestion-btn {

    border: 1px solid #dbeafe;

    background: #ffffff;

    color: var(--lucid-chat-accent);

    border-radius: 20px;

    padding: 7px 10px;

    font-size: 0.72rem;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;

}


.lucid-suggestion-btn:hover {

    background: #eff6ff;

    border-color: #93c5fd;

}


/* =========================================================
   TYPING INDICATOR
   ========================================================= */

.lucid-typing {

    display: flex;

    align-items: center;

    gap: 4px;

    width: fit-content;

    padding: 11px 13px;

    background: var(--lucid-chat-bot);

    border-radius: 14px;

    border-bottom-left-radius: 4px;

}


.lucid-typing span {

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #9ca3af;

    animation: lucidTyping 1.2s infinite ease-in-out;

}


.lucid-typing span:nth-child(2) {

    animation-delay: 0.15s;

}


.lucid-typing span:nth-child(3) {

    animation-delay: 0.3s;

}


@keyframes lucidTyping {

    0%, 60%, 100% {

        transform: translateY(0);

        opacity: 0.5;

    }

    30% {

        transform: translateY(-4px);

        opacity: 1;

    }

}


/* =========================================================
   INPUT AREA
   ========================================================= */

.lucid-chat-input-area {

    padding: 10px 12px 9px;

    background: #ffffff;

    border-top: 1px solid var(--lucid-chat-border);

    flex-shrink: 0;

}


.lucid-chat-form {

    display: flex;

    align-items: center;

    gap: 7px;

}


.lucid-chat-form input {

    flex: 1;

    min-width: 0;

    height: 43px;

    border: 1px solid var(--lucid-chat-border);

    border-radius: 12px;

    padding: 0 13px;

    outline: none;

    color: var(--lucid-chat-text);

    background: #f9fafb;

    font-size: 0.84rem;

}


.lucid-chat-form input:focus {

    border-color: #93c5fd;

    background: #ffffff;

    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);

}


.lucid-send-btn {

    width: 43px;
    height: 43px;

    flex-shrink: 0;

    border: none;

    border-radius: 12px;

    background: var(--lucid-chat-accent);

    color: #ffffff;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease;

}


.lucid-send-btn:hover {

    background: var(--lucid-chat-accent-hover);

}


.lucid-chat-disclaimer {

    margin-top: 6px;

    text-align: center;

    font-size: 0.62rem;

    color: #9ca3af;

}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 600px) {

    .lucid-chat-float {

        right: 17px;

        bottom: 17px;

        width: 56px;

        height: 56px;

    }


    .lucid-chatbot {

        right: 10px;

        bottom: 82px;

        width: calc(100vw - 20px);

        height: calc(100vh - 105px);

        max-height: none;

        border-radius: 18px;

    }


    .lucid-topic-list {

        grid-template-columns: 1fr;

    }


    .lucid-welcome-screen {

        padding: 22px 16px;

    }


    .lucid-chat-messages {

        padding: 14px;

    }

}


@media (max-width: 380px) {

    .lucid-chat-brand-text span {

        display: none;

    }


    .lucid-topic-btn {

        font-size: 0.74rem;

    }

}


/* =========================================================
   REDUCE MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .lucid-chatbot,
    .lucid-chat-float,
    .lucid-message,
    .lucid-topic-btn {

        transition: none;

        animation: none;

    }

}