.al-chat-root {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1200;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.al-chat-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, #00A0E4 0%, #0088c7 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 0.85rem 1.2rem;
    box-shadow: 0 10px 25px rgba(0, 160, 228, 0.35);
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.al-chat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 160, 228, 0.4);
}

.al-chat-toggle-badge {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.al-chat-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    width: min(380px, calc(100vw - 2rem));
    height: 520px;
    max-height: calc(100vh - 6rem);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.al-chat-panel[hidden] {
    display: none !important;
}

.al-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.85rem;
    background: linear-gradient(135deg, #00A0E4 0%, #0088c7 100%);
    color: #fff;
}

.al-chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.al-chat-header-info strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
}

.al-chat-header-info small {
    opacity: 0.9;
    font-size: 0.78rem;
}

.al-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: grid;
    place-items: center;
    font-weight: 700;
}

.al-chat-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.9;
}

.al-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.al-chat-bubble {
    max-width: 88%;
    padding: 0.75rem 0.9rem;
    border-radius: 14px;
    font-size: 0.92rem;
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.al-chat-bubble strong {
    font-weight: 700;
}

.al-chat-bubble.user {
    align-self: flex-end;
    background: #00A0E4;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.al-chat-bubble.assistant {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.al-chat-products {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.al-chat-product-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #eff8fd;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    transition: background 0.15s ease;
}

.al-chat-product-card:hover {
    background: #dbeafe;
}

.al-chat-product-card strong {
    display: block;
    color: #0369a1;
    font-size: 0.88rem;
}

.al-chat-product-card span {
    display: block;
    font-size: 0.8rem;
    color: #475569;
    margin-top: 0.15rem;
}

.al-chat-typing {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.65rem 0.9rem;
    color: #64748b;
    font-size: 0.85rem;
}

.al-chat-form {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.al-chat-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    font: inherit;
    outline: none;
}

.al-chat-input:focus {
    border-color: #00A0E4;
    box-shadow: 0 0 0 3px rgba(0, 160, 228, 0.15);
}

.al-chat-send {
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #00A0E4;
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.al-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .al-chat-root {
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .al-chat-toggle-text {
        display: none;
    }

    .al-chat-panel {
        width: calc(100vw - 1.5rem);
        height: calc(100vh - 5rem);
    }
}
