/**
 * LISA AI Chat Widget Styles
 */

#lisa-ai-widget {
    --lisa-primary-color: #0066cc;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    z-index: 999999;
}

/* Position variants */
.lisa-widget-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.lisa-widget-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
}

/* Chat Button (pill style) */
.lisa-chat-button-pill {
    padding: 12px 20px;
    border-radius: 25px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.lisa-chat-button-pill:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.lisa-button-text {
    pointer-events: none;
}

.lisa-button-close {
    font-size: 18px;
    opacity: 0.7;
    margin-left: 4px;
}

/* Chat Window */
.lisa-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 40px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.lisa-widget-bottom-left .lisa-chat-window {
    right: auto;
    left: 0;
}

/* Chat Header */
.lisa-chat-header {
    background: var(--lisa-primary-color);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
}

.lisa-chat-header:active {
    cursor: grabbing;
}

.lisa-chat-header-info {
    display: flex;
    flex-direction: column;
}

.lisa-chat-title {
    font-weight: 600;
    font-size: 16px;
}

.lisa-chat-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.lisa-chat-header-btn {
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.2s;
    line-height: 1;
}

.lisa-chat-header-btn:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Chat Messages */
.lisa-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f9f9f9;
}

.lisa-message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    font-size: 14px;
}

.lisa-message-user {
    background: var(--lisa-primary-color);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.lisa-message-assistant {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.lisa-assistant-name {
    font-weight: 600;
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.lisa-message-typing {
    display: flex;
    gap: 4px;
    padding: 16px;
}

.lisa-message-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: lisa-typing 1.4s infinite;
}

.lisa-message-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.lisa-message-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes lisa-typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-4px);
    }
}

/* Product Cards in Messages */
.lisa-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.lisa-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
}

.lisa-product-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.lisa-product-card-title {
    font-weight: 600;
    font-size: 12px;
    margin: 6px 0 2px;
    line-height: 1.2;
}

.lisa-product-card-price {
    color: var(--lisa-primary-color);
    font-weight: 600;
    font-size: 12px;
}

.lisa-product-card-link {
    display: inline-block;
    margin-top: 4px;
    color: var(--lisa-primary-color);
    text-decoration: none;
    font-size: 11px;
}

.lisa-product-card-link:hover {
    text-decoration: underline;
}

/* Chat Input */
.lisa-chat-input-container {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 8px;
}

.lisa-chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 24px;
    outline: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
}

.lisa-chat-input:focus {
    border-color: var(--lisa-primary-color);
}

.lisa-chat-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--lisa-primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lisa-chat-send:hover {
    background: color-mix(in srgb, var(--lisa-primary-color) 85%, black);
}

.lisa-chat-send svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

/* Mobile Responsive */
@media screen and (max-width: 480px) {
    .lisa-chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        bottom: 70px;
    }
}