/* ================================
   MAIN CONTAINER & POSITIONING
   ================================ */
#custom-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* ================================
   FLOATING CHAT ICON
   ================================ */
.chatbot-icon {
    background-color: #d80000;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 35% / 35%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transition: all 0.2s ease-out;
}
.chatbot-icon:hover {
    transform: scale(1.1);
}
.chatbot-icon.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* ================================
   CHAT WINDOW
   ================================ */
.chatbot-window {
    width: 360px;
    max-width: 90vw;
    height: 600px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 0;
    right: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
}
.chatbot-window.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* ================================
   CHAT HEADER
   ================================ */
.chatbot-header {
    background-color: #d80000;
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}
.chatbot-logo img {
    height: 25px;
    display: block;
}
.chatbot-header-text {
    flex-grow: 1;
}
.chatbot-title {
    font-weight: bold;
    font-size: 1.1em;
}
.chatbot-subtitle {
    font-size: 0.85em;
    opacity: 0.9;
}
.chatbot-close {
    background: rgba(0,0,0,0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}
.chatbot-close:hover {
    background: rgba(0,0,0,0.4);
}

/* ================================
   CHAT BODY
   ================================ */
.chatbot-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    background-color: #ffffff;
}
.chatbot-message-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.chatbot-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #6c5ce7;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
.chatbot-sender-name {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}
.chatbot-message {
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.5;
    word-wrap: break-word;
}
.chatbot-message.received {
    background-color: #f1f0f0;
    color: #333;
    border-top-left-radius: 0;
}
.chatbot-message a {
    color: #0066cc;
    text-decoration: underline;
}

/* ================================
   CHAT FOOTER (FIXED & FINALIZED)
   ================================ */
.chatbot-footer {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid #e0e0e0;
    background-color: #ffffff;
    flex-shrink: 0;
    gap: 10px;
}

.chatbot-upload-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #f5f5f5;
    transition: background-color 0.3s;
}
.chatbot-upload-icon svg {
    width: 22px;
    height: 22px;
    fill: #555;
}
.chatbot-upload-icon:hover {
    background-color: #eaeaea;
}
.chatbot-upload-icon:hover svg {
    fill: #000;
}

.chatbot-form {
    flex-grow: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-input {
    flex-grow: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: #fff;
}

.chatbot-input::placeholder {
    color: #999;
}

.chatbot-send {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 0;
}

.chatbot-send:hover {
    background-color: #e0e0e0;
}

.chatbot-send svg {
    fill: #555;
    width: 22px;
    height: 22px;
}
