/* Perfume assistant widget — self-contained, no framework dependency. */

.aroma-chat-toggle {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1045;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #b08d4f;
    color: #fff;
    font-size: 1.4rem;
    box-shadow: 0 10px 26px rgba(29, 27, 26, .32);
    cursor: pointer;
}
.aroma-chat-toggle:hover { background: #8c6f3c; }

.aroma-chat-toggle .unread {
    position: absolute;
    top: -2px; right: -2px;
    background: #dc3545;
    color: #fff;
    border-radius: 999px;
    font-size: .65rem;
    padding: 1px 6px;
}

.aroma-chat-panel {
    position: fixed;
    right: 22px;
    bottom: 94px;
    z-index: 1046;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(29, 27, 26, .28);
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-size: .9rem;
}
.aroma-chat-panel.open { display: flex; }

.aroma-chat-header {
    background: #1d1b1a;
    color: #fff;
    padding: .85rem 1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.aroma-chat-header .title { font-weight: 600; line-height: 1.1; }
.aroma-chat-header .subtitle { font-size: .72rem; color: #b08d4f; }
.aroma-chat-header button {
    background: transparent; border: none; color: #cfc7bb; font-size: 1rem; cursor: pointer;
}
.aroma-chat-header button:hover { color: #fff; }

.aroma-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #faf7f2;
}

.aroma-msg { display: flex; margin-bottom: .75rem; }
.aroma-msg.user { justify-content: flex-end; }
.aroma-msg .bubble {
    max-width: 85%;
    padding: .6rem .8rem;
    border-radius: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}
.aroma-msg.bot .bubble { background: #fff; border: 1px solid #e8e1d6; border-bottom-left-radius: 4px; }
.aroma-msg.user .bubble { background: #b08d4f; color: #fff; border-bottom-right-radius: 4px; }
.aroma-msg .bubble strong { font-weight: 600; }
.aroma-msg .bubble em { color: #6f6a66; font-style: italic; font-size: .82rem; }

.aroma-typing span {
    display: inline-block; width: 6px; height: 6px; margin-right: 3px;
    background: #b08d4f; border-radius: 50%; animation: aroma-bounce 1.1s infinite;
}
.aroma-typing span:nth-child(2) { animation-delay: .15s; }
.aroma-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aroma-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: .5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

.aroma-card {
    display: flex;
    gap: .6rem;
    background: #fff;
    border: 1px solid #e8e1d6;
    border-radius: 12px;
    padding: .55rem;
    margin-bottom: .5rem;
}
.aroma-card img {
    width: 62px; height: 62px; object-fit: cover; border-radius: 8px; background: #faf7f2; flex: 0 0 auto;
}
.aroma-card .info { min-width: 0; flex: 1; }
.aroma-card .name { font-weight: 600; font-size: .85rem; display: block; color: #1d1b1a; }
.aroma-card .meta { font-size: .72rem; color: #6f6a66; }
.aroma-card .price { font-size: .85rem; color: #b08d4f; font-weight: 600; }
.aroma-card .actions { display: flex; gap: .3rem; margin-top: .35rem; flex-wrap: wrap; }
.aroma-card .actions button,
.aroma-card .actions a {
    font-size: .72rem; padding: .22rem .55rem; border-radius: 999px; cursor: pointer;
    border: 1px solid #b08d4f; background: #fff; color: #b08d4f;
}
.aroma-card .actions button.primary { background: #b08d4f; color: #fff; }
.aroma-card .actions button:disabled { opacity: .55; cursor: not-allowed; }

.aroma-sources { font-size: .72rem; color: #6f6a66; margin-top: .35rem; }

.aroma-suggestions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.aroma-suggestions button {
    font-size: .74rem; padding: .28rem .6rem; border-radius: 999px;
    border: 1px solid #e8e1d6; background: #fff; color: #1d1b1a; cursor: pointer;
}
.aroma-suggestions button:hover { border-color: #b08d4f; color: #b08d4f; }

.aroma-chat-footer {
    border-top: 1px solid #e8e1d6;
    padding: .6rem;
    display: flex;
    gap: .4rem;
    background: #fff;
}
.aroma-chat-footer input {
    flex: 1; border: 1px solid #e8e1d6; border-radius: 999px; padding: .5rem .9rem; font-size: .88rem;
}
.aroma-chat-footer input:focus { outline: none; border-color: #b08d4f; }
.aroma-chat-footer button {
    border: none; background: #b08d4f; color: #fff; width: 40px; border-radius: 50%; cursor: pointer;
}
.aroma-chat-footer button:disabled { opacity: .6; }

@media (max-width: 420px) {
    .aroma-chat-panel { right: 12px; left: 12px; width: auto; bottom: 86px; }
}
