/* 
   Al-Rasheed Diagnostic Center - Premium Chatbot Styles
   Theme: Cyan (#00ADEF) & Red (#ED1C24)
*/

:root {
    --rdc-primary: #00ADEF;
    --rdc-primary-dark: #0088CC;
    --rdc-secondary: #ED1C24;
    --rdc-text: #1a1a1a;
    --rdc-bg: #ffffff;
    --rdc-shadow: 0 10px 40px rgba(0,0,0,0.15);
    --rdc-radius: 18px;
    --rdc-glass: rgba(255, 255, 255, 0.9);
}

#rdc-chat-launcher {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--rdc-primary), var(--rdc-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 6px 25px rgba(0, 173, 239, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#rdc-chat-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(0, 173, 239, 0.5);
}

#rdc-chat-launcher svg {
    width: 32px;
    height: 32px;
    fill: white;
}

#rdc-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--rdc-primary);
    opacity: 0.6;
    animation: rdc-pulse-anim 2s infinite;
    z-index: -1;
}

@keyframes rdc-pulse-anim {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0; }
}

#rdc-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: var(--rdc-bg);
    border-radius: var(--rdc-radius);
    box-shadow: var(--rdc-shadow);
    display: none;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(0,0,0,0.05);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
}

#rdc-chat-window.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

#rdc-chat-header {
    background: linear-gradient(135deg, var(--rdc-primary), var(--rdc-primary-dark));
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rdc-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rdc-avatar {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.rdc-avatar img {
    width: 100%;
    height: auto;
}

.rdc-status-info h4 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.rdc-online-tag {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.rdc-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

#rdc-chat-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#rdc-chat-close:hover {
    background: rgba(255,255,255,0.3);
}

#rdc-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

#rdc-messages::-webkit-scrollbar {
    width: 5px;
}

#rdc-messages::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: msg-slide 0.3s ease;
}

@keyframes msg-slide {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.bot-msg {
    align-self: flex-start;
    background: white;
    color: var(--rdc-text);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-msg {
    align-self: flex-end;
    background: var(--rdc-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.msg-time {
    font-size: 0.7rem;
    margin-top: 5px;
    opacity: 0.6;
    display: block;
    text-align: right;
}

.user-msg .msg-time {
    color: rgba(255,255,255,0.8);
}

#rdc-quick-replies {
    padding: 10px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.quick-reply {
    background: white;
    border: 1px solid var(--rdc-primary);
    color: var(--rdc-primary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.quick-reply:hover {
    background: var(--rdc-primary);
    color: white;
}

#rdc-chat-input-area {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 12px;
}

#rdc-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    border-radius: 25px;
    outline: none;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border 0.3s;
    background: #f8fafc;
}

#rdc-input:focus {
    border-color: var(--rdc-primary);
    background: white;
}

#rdc-send {
    background: var(--rdc-primary);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 10px rgba(0, 173, 239, 0.2);
}

#rdc-send:hover {
    background: var(--rdc-primary-dark);
    transform: scale(1.05);
}

#rdc-send svg {
    width: 20px;
    height: 20px;
    transform: translate(1px, 0);
}

.rdc-typing {
    display: flex;
    gap: 4px;
    padding: 10px;
}

.rdc-typing span {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: rdc-typing-anim 1.4s infinite;
}

.rdc-typing span:nth-child(2) { animation-delay: 0.2s; }
.rdc-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes rdc-typing-anim {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

#rdc-chat-footer {
    padding: 8px;
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

#rdc-chat-footer strong {
    color: var(--rdc-primary);
}

@media (max-width: 480px) {
    #rdc-chat-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    
    #rdc-chat-launcher {
        bottom: 20px;
        right: 20px;
    }
}
