/* Vidya AI Virtual Assistant Styles */

/* Floating Launcher Button */
#vidya-launcher {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    cursor: pointer;
    display: flex;
    items-center: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.vidya-launcher-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    border: 2px solid #38bdf8;
    box-shadow: 0 10px 25px -5px rgba(30, 58, 138, 0.5), 0 0 15px rgba(56, 189, 248, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vidya-launcher-btn:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(30, 58, 138, 0.7), 0 0 22px rgba(56, 189, 248, 0.6);
}

.vidya-launcher-img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 50%;
    background-color: #ffffff;
    padding: 3px;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.1);
}

.vidya-badge-online {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background-color: #22c55e;
    border: 2.5px solid #0f172a;
    border-radius: 50%;
}

.vidya-pulse-ring {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid rgba(56, 189, 248, 0.6);
    animation: vidyaPulse 2s infinite;
    pointer-events: none;
}

@keyframes vidyaPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.12);
        opacity: 0;
    }

    100% {
        transform: scale(0.95);
        opacity: 0;
    }
}

/* Chat Drawer Container */
#vidya-chat-drawer {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.3), 0 0 1px 1px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#vidya-chat-drawer.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Drawer Header */
.vidya-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.vidya-avatar-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #38bdf8;
}

.vidya-status-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px #22c55e;
}

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

.vidya-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

/* Chat Scroll Body */
.vidya-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.vidya-body::-webkit-scrollbar {
    width: 5px;
}

.vidya-body::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

/* Messages */
.vidya-msg {
    max-width: 85%;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.55;
    border-radius: 14px;
    word-break: break-word;
    animation: vidyaMsgFade 0.25s ease-out;
}

@keyframes vidyaMsgFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vidya-msg-bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.vidya-msg-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.25);
}

/* Formatting inside Bot Messages */
.vidya-msg-bot a {
    color: #0284c7;
    font-weight: 700;
    text-decoration: underline;
}

.vidya-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 4px;
    padding: 7px 14px;
    background: #f0f9ff;
    color: #0284c7 !important;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.vidya-action-btn:hover {
    background: #0284c7;
    color: #ffffff !important;
    border-color: #0284c7;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.vidya-msg-bot strong {
    color: #0f172a;
}

.vidya-msg-bot ul {
    margin-top: 6px;
    margin-bottom: 6px;
    padding-left: 0;
    list-style: none;
}

/* Quick Suggestion Pills */
.vidya-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.vidya-pill {
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vidya-pill:hover {
    background-color: #1e3a8a;
    color: #ffffff;
    border-color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.2);
}

/* Typing Bouncing Dots */
.vidya-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
}

.vidya-dot {
    width: 6px;
    height: 6px;
    background-color: #94a3b8;
    border-radius: 50%;
    animation: vidyaBounce 1.2s infinite ease-in-out;
}

.vidya-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.vidya-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes vidyaBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* Drawer Footer / Input Bar */
.vidya-footer {
    padding: 12px 16px;
    background-color: #ffffff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vidya-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.vidya-input:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.vidya-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    flex-shrink: 0;
}

.vidya-send-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    #vidya-chat-drawer {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 84px;
        height: 480px;
    }

    #vidya-launcher {
        bottom: 16px;
        right: 16px;
    }
}