/* Main Theme Color Variable */
:root {
    --llc-primary: #965d0b;
    --llc-primary-dark: #7a4b08;
    --llc-primary-light: #b07a2a;
    --llc-white: #ffffff;
    --llc-black: #333333;
    --llc-gray: #f4f4f4;
    --llc-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#llc-chat-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.llc-chat-hidden {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.llc-chat-visible {
    opacity: 1;
    pointer-events: auto;
}

#llc-chat-toggle {
    width: 55px;
    height: 55px;
    background-color: var(--llc-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--llc-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    /* Zoomed image effect */
}

#llc-chat-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Zoom to fill */
}

#llc-chat-toggle .llc-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    /* Hidden by default, toggled by JS */
    align-items: center;
    justify-content: center;
    border: 2px solid var(--llc-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

#llc-chat-box {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 340px;
    max-height: 500px;
    background-color: var(--llc-white);
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: bottom right;
}

.llc-hidden {
    display: none !important;
}

.llc-toggle-hidden {
    transform: scale(0) !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#llc-chat-header {
    background: linear-gradient(135deg, var(--llc-primary), var(--llc-primary-dark));
    padding: 20px;
    color: var(--llc-white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.llc-header-info {
    display: flex;
    align-items: center;
}

.llc-avatar {
    width: 60px;
    /* Increased size as requested */
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    background: white;
}

.llc-title-group {
    display: flex;
    flex-direction: column;
}

.llc-name {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.llc-status {
    font-size: 12px;
    opacity: 0.85;
}

#llc-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--llc-white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

#llc-chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#llc-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--llc-gray);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 300px;
    max-height: 380px;
}

/* Typing Animation */
.llc-typing {
    display: flex;
    gap: 5px;
    padding: 12px 15px;
    background: white;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.llc-dot {
    width: 8px;
    height: 8px;
    background: var(--llc-primary);
    border-radius: 50%;
    animation: llc-bounce 1.4s infinite ease-in-out both;
}

.llc-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.llc-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes llc-bounce {

    0%,
    80%,
    100% {
        transform: scale(0.3);
        opacity: 0.3;
    }

    40% {
        transform: scale(1.0);
        opacity: 1;
    }
}

@keyframes llc-float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.llc-floating {
    animation: llc-float 3s ease-in-out infinite;
}

.llm-msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
}

.llm-msg-row-bot {
    flex-direction: row;
}

.llm-msg-row-user {
    flex-direction: row-reverse;
}

.llc-bot-msg-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    flex-shrink: 0;
    object-fit: cover;
}

.llc-user-msg-icon {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--llc-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.llc-message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 75%;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.llc-message-bot {
    background-color: var(--llc-white);
    border-bottom-left-radius: 4px;
    color: var(--llc-black);
}

.llc-message-user {
    background-color: var(--llc-primary);
    color: var(--llc-white);
    border-bottom-right-radius: 4px;
}

#llc-chat-footer {
    padding: 15px;
    background-color: var(--llc-white);
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#llc-chat-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    padding: 10px 18px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s;
}

#llc-chat-input:focus {
    border-color: var(--llc-primary);
}

#llc-chat-send {
    background-color: var(--llc-primary);
    color: var(--llc-white);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

#llc-chat-send:hover {
    background-color: var(--llc-primary-dark);
}

.llc-action-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background-color: var(--llc-primary);
    color: white;
    text-align: center;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.3s;
}

.llc-action-btn:hover {
    background-color: var(--llc-primary-dark);
    transform: translateY(-2px);
}

.llc-btn-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Responsive Adjustments */
@media screen and (max-width: 480px) {
    #llc-chat-widget-container {
        bottom: 15px;
        right: 15px;
    }

    #llc-chat-box {
        width: calc(100vw - 30px);
        bottom: 65px;
        max-height: 70vh;
    }

    #llc-chat-toggle {
        width: 50px;
        height: 50px;
    }

    #llc-chat-header {
        padding: 15px;
    }

    #llc-chat-messages {
        padding: 15px;
        min-height: 250px;
    }
}