/* ==========================================================================
   MILA FLOWERS - CHATBOT WIDGET STYLES
   ========================================================================== */

.chat-widget-button {
    position: fixed;
    bottom: 28px;
    left: 28px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #183B2B;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(24, 59, 43, 0.28);
    z-index: 998;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease;
}

.chat-widget-button:hover {
    transform: scale(1.08);
    background: #11291E;
}

.chat-widget-button i {
    font-size: 1.3rem;
}

.chat-notification {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #C85A54;
    border-radius: 50%;
    border: 2px solid #FFFFFF;
}

.chat-widget-panel {
    position: fixed;
    bottom: 100px;
    left: 28px;
    width: 370px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
    border: 1px solid #E8E5DF;
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    animation: chatSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-widget-panel.open {
    display: flex;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-widget-header {
    background: #183B2B;
    color: #FFFFFF;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-widget-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-widget-close {
    background: transparent;
    border: none;
    color: #FFFFFF;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-widget-close:hover {
    opacity: 1;
}

.chat-widget-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #FAF9F6;
}

.chat-widget-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
}

.chat-widget-message.bot {
    align-self: flex-start;
}

.chat-widget-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-widget-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #183B2B;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.chat-widget-bubble {
    background: #FFFFFF;
    border: 1px solid #E8E5DF;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #1C2320;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.chat-widget-message.user .chat-widget-bubble {
    background: #183B2B;
    color: #FFFFFF;
    border-color: #183B2B;
}

.chat-widget-time {
    font-size: 0.65rem;
    color: #8E9993;
    margin-top: 4px;
    display: block;
}

.chat-widget-suggestions {
    padding: 8px 16px;
    background: #FFFFFF;
    border-top: 1px solid #F0EDE8;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}

.chat-widget-suggestions::-webkit-scrollbar {
    display: none;
}

.suggestions-loading {
    font-size: 0.72rem;
    color: #8E9993;
    padding: 4px 0;
}

.chat-suggestion-chip {
    padding: 6px 12px;
    background: #F6F4F0;
    border-radius: 20px;
    font-size: 0.72rem;
    color: #1C2320;
    cursor: pointer;
    white-space: nowrap;
    border: 1px solid #E8E5DF;
    transition: background 0.15s;
}

.chat-suggestion-chip:hover {
    background: #EBF2EC;
    color: #183B2B;
}

.chat-widget-input-area {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    background: #FFFFFF;
    border-top: 1px solid #E8E5DF;
    gap: 8px;
}

.chat-widget-input-area input {
    flex: 1;
    border: 1px solid #E8E5DF;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 0.82rem;
    outline: none;
    transition: border-color 0.2s;
}

.chat-widget-input-area input:focus {
    border-color: #183B2B;
}

.chat-widget-input-area button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #183B2B;
    color: #FFFFFF;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-widget-input-area button:hover {
    background: #11291E;
}

@media (max-width: 480px) {
    .chat-widget-panel {
        left: 12px;
        right: 12px;
        bottom: 80px;
        width: auto;
    }
    .chat-widget-button {
        left: 16px;
        bottom: 20px;
    }
}
