/* ==========================================
   CHATBOT.CSS - Chatbot Widget
   ========================================== */

.chatbot {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: min(360px, calc(100vw - 36px));
    z-index: 1000;
    max-width: calc(100vw - 36px);
}

@media (max-width: 768px) {
    .chatbot {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 15px;
        width: min(360px, calc(100vw - 40px));
    }

    .chat-panel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .chatbot {
        left: 10px;
        right: 10px;
        bottom: 10px;
        width: auto;
        max-width: none;
        transform: none;
    }

    .chat-button {
        padding: 10px 12px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .chat-body {
        max-height: 250px;
    }

    .chat-input {
        padding: 10px;
        gap: 8px;
    }

    .chat-input input {
        font-size: 14px;
        padding: 10px;
    }

    .chat-input button {
        padding: 10px 12px;
        font-size: 13px;
    }
}

.chat-button {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--primary);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 12px 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.chat-panel {
    margin-top: 10px;
    display: none;
    overflow: hidden;
}

.chat-panel.open {
    display: block;
}

.chat-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
}

.chat-head strong {
    font-size: 14px;
}

.chat-body {
    padding: 12px 14px;
    background: var(--bg);
    max-height: 320px;
    overflow: auto;
}

.msg {
    padding: 10px 12px;
    border-radius: 14px;
    margin: 8px 0;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    font-size: 14px;
}

.msg.me {
    background: #fff;
    border-color: rgba(216, 27, 96, .25);
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.chat-input input {
    flex: 1;
    border-radius: 999px;
}

.chat-input button {
    border-radius: 999px;
    border: 0;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
}
