/* DigAiDental — Chat Widget CSS */
/* Floating chatbot widget styles */

.chat-widget-wrap {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9000;
    font-family: 'Manrope', sans-serif;
}

/* Bubble button */
.chat-bubble-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(201,168,76,0.45);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}
.chat-bubble-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 10px 36px rgba(201,168,76,0.55);
}
.chat-bubble-btn svg {
    width: 28px;
    height: 28px;
    fill: #07112e;
}
.chat-bubble-btn .chat-close-icon { display: none; }
.chat-widget-wrap.open .chat-bubble-btn .chat-open-icon { display: none; }
.chat-widget-wrap.open .chat-bubble-btn .chat-close-icon { display: block; }
.chat-bubble-btn .chat-close-icon {
    font-size: 1.4rem;
    color: #07112e;
    line-height: 1;
}

/* Notification dot */
.chat-notif-dot {
    position: absolute;
    top: 4px; right: 4px;
    width: 12px; height: 12px;
    background: #e86060;
    border-radius: 50%;
    border: 2px solid #07112e;
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

/* Chat window */
.chat-window {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    max-height: 520px;
    background: #0d1b4b;
    border: 1px solid #1a2d6e;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}
.chat-widget-wrap.open .chat-window { display: flex; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chat header */
.chat-header {
    background: linear-gradient(135deg, #0f1e52, #162460);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #1a2d6e;
}
.chat-header-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.chat-header-info { flex: 1; }
.chat-header-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.chat-header-status {
    font-size: 0.75rem;
    color: #c9a84c;
    display: flex;
    align-items: center;
    gap: 5px;
}
.chat-header-status::before {
    content: '';
    width: 6px; height: 6px;
    background: #4ade80;
    border-radius: 50%;
}

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 340px;
    scrollbar-width: thin;
    scrollbar-color: #1a2d6e transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #1a2d6e; border-radius: 2px; }

/* Message bubbles */
.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 82%;
    animation: msgIn 0.25s ease;
}
@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot { align-items: flex-start; }
.chat-msg.user { align-items: flex-end; align-self: flex-end; }
.chat-msg.admin { align-items: flex-start; }

.chat-bubble {
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 0.85rem;
    line-height: 1.55;
}
.chat-msg.bot .chat-bubble {
    background: #162460;
    border: 1px solid #1a2d6e;
    color: #e8eaf0;
    border-bottom-left-radius: 4px;
}
.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, #c9a84c, #a07830);
    color: #07112e;
    font-weight: 600;
    border-bottom-right-radius: 4px;
}
.chat-msg.admin .chat-bubble {
    background: rgba(201,168,76,0.08);
    border: 1px solid rgba(201,168,76,0.2);
    color: #e8eaf0;
    border-bottom-left-radius: 4px;
}
.chat-admin-label {
    font-size: 0.7rem;
    color: #c9a84c;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Typing indicator */
.chat-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 15px;
    background: #162460;
    border: 1px solid #1a2d6e;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}
.chat-typing span {
    width: 7px; height: 7px;
    background: #c9a84c;
    border-radius: 50%;
    animation: typingBounce 1.3s infinite ease-in-out;
    opacity: 0.7;
}
.chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* Input area */
.chat-input-area {
    padding: 12px 14px;
    border-top: 1px solid #1a2d6e;
    display: flex;
    gap: 10px;
    align-items: center;
}
.chat-input {
    flex: 1;
    background: #07112e;
    border: 1px solid #1a2d6e;
    border-radius: 50px;
    padding: 10px 18px;
    color: #e8eaf0;
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.3s;
}
.chat-input:focus { border-color: #c9a84c; }
.chat-input::placeholder { color: #5a6888; }
.chat-send-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.chat-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(201,168,76,0.4);
}
.chat-send-btn svg { width: 18px; height: 18px; fill: #07112e; }
