/* ==========================================================================
   SupremeVeda — Ask Veda AI Floating Assistant (Pristine White / Light Vedic Theme)
   ========================================================================== */

/* Floating Button (Crisp White Pill with Warm Golden Rim) */
.veda-ai-float-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border: 1.5px solid #f59e0b;
    padding: 8px 18px 8px 8px;
    border-radius: 50px;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 0 12px rgba(245, 158, 11, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: pulseVedaWhiteGlow 3s infinite alternate;
}

.veda-ai-float-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.16), 0 0 16px rgba(245, 158, 11, 0.35);
    border-color: #d97706;
}

@keyframes pulseVedaWhiteGlow {
    0% { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1), 0 0 8px rgba(245, 158, 11, 0.15); }
    100% { box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15), 0 0 15px rgba(245, 158, 11, 0.3); }
}

.veda-ai-float-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f59e0b;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.veda-ai-float-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.veda-ai-float-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.15;
    color: #0f172a;
}

.veda-ai-float-sub {
    font-size: 0.68rem;
    color: #d97706;
    font-weight: 600;
}

/* Floating Chat Drawer Window (Clean White Theme) */
.veda-ai-drawer {
    position: fixed;
    bottom: 84px;
    left: 24px;
    width: 385px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 110px);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.14), 0 2px 10px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.96);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.veda-ai-drawer.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Drawer Header (Light Warm Tone with Golden Accent) */
.veda-ai-drawer-header {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    padding: 12px 16px;
    border-bottom: 1px solid #fde68a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.veda-ai-drawer-header .header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.veda-ai-drawer-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #f59e0b;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

.veda-ai-drawer-header .title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #78350f;
    margin: 0;
}

.veda-ai-drawer-header .subtitle {
    font-size: 0.68rem;
    color: #16a34a;
    font-weight: 600;
    margin: 0;
}

.veda-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.veda-switch-btn {
    background: #ffffff;
    border: 1px solid #fcd34d;
    color: #b45309;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.veda-switch-btn:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
    transform: scale(1.02);
}

.veda-ai-close-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #64748b;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.veda-ai-close-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
}

/* Chat Messages Area (Soft Clean White/Off-White) */
.veda-ai-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fafaf9;
}

/* Active Profile Bar (Compact header banner inside chat) */
.veda-active-profile-bar {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 0.74rem;
    color: #92400e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 1px 4px rgba(245, 158, 11, 0.08);
}

.veda-msg {
    max-width: 86%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.83rem;
    line-height: 1.5;
    word-break: break-word;
}

/* User Bubble: Vibrant Amber / Saffron Gradient with White Text */
.veda-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.2);
}

/* Bot Bubble: Pure Crisp White with Soft Shadow & Slate Text */
.veda-msg.bot {
    align-self: flex-start;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.veda-msg.bot strong {
    color: #b45309;
}

/* ==========================================================================
   Crystal Glassmorphic Action Buttons (.veda-portal-btn)
   ========================================================================== */

.veda-btn-wrapper {
    margin: 8px 0;
    display: block;
    width: 100%;
}

.veda-msg.bot br + .veda-btn-wrapper,
.veda-btn-wrapper + br {
    display: none;
}

/* Base Crystal Button */
.veda-msg.bot a.veda-portal-btn,
.veda-portal-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 9px 18px !important;
    border-radius: 50px !important;
    font-family: 'Outfit', sans-serif, system-ui !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    pointer-events: auto !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative !important;
    overflow: hidden !important;
    word-break: break-word !important;
}

.veda-portal-btn strong {
    color: inherit !important;
    font-weight: 700 !important;
}

.veda-portal-btn .veda-btn-icon {
    font-size: 1.05rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── 1. PRIMARY GOLDEN CRYSTAL BUTTON (Live Chat CTA) ── */
.veda-msg.bot a.veda-portal-btn.veda-btn-primary,
.veda-portal-btn.veda-btn-primary {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(254, 243, 199, 0.9) 45%, rgba(253, 230, 138, 0.95) 100%) !important;
    border: 1.5px solid rgba(217, 119, 6, 0.5) !important;
    color: #854d0e !important;
    box-shadow: 
        0 4px 18px rgba(245, 158, 11, 0.22),
        0 1px 3px rgba(0, 0, 0, 0.04),
        inset 0 1.5px 2px rgba(255, 255, 255, 1),
        inset 0 -1.5px 3px rgba(217, 119, 6, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.veda-portal-btn.veda-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: skewX(-25deg);
    transition: all 0.75s ease;
    pointer-events: none;
}

.veda-portal-btn.veda-btn-primary:hover::before {
    left: 140%;
}

.veda-msg.bot a.veda-portal-btn.veda-btn-primary:hover,
.veda-portal-btn.veda-btn-primary:hover {
    background: linear-gradient(135deg, #ffffff 0%, #fef3c7 40%, #fde68a 100%) !important;
    border-color: #d97706 !important;
    color: #713f12 !important;
    transform: translateY(-2px) scale(1.01) !important;
    box-shadow: 
        0 8px 25px rgba(217, 119, 6, 0.32),
        0 2px 6px rgba(0, 0, 0, 0.06),
        inset 0 1.5px 2px rgba(255, 255, 255, 1) !important;
}

.veda-msg.bot a.veda-portal-btn.veda-btn-primary:active,
.veda-portal-btn.veda-btn-primary:active {
    transform: translateY(0) scale(0.99) !important;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.2) !important;
}

/* ── 2. SECONDARY DIAMOND / GLASS CRYSTAL BUTTON (Kundli, Horoscope, etc.) ── */
.veda-msg.bot a.veda-portal-btn.veda-btn-crystal,
.veda-portal-btn.veda-btn-crystal,
.veda-msg.bot a:not(.veda-btn-primary),
.veda-portal-btn:not(.veda-btn-primary) {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.85) 100%) !important;
    border: 1.5px solid rgba(203, 213, 225, 0.9) !important;
    color: #334155 !important;
    box-shadow: 
        0 3px 12px rgba(0, 0, 0, 0.04),
        0 1px 2px rgba(0, 0, 0, 0.02),
        inset 0 1.5px 1.5px rgba(255, 255, 255, 1),
        inset 0 -1px 2px rgba(203, 213, 225, 0.2) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
}

.veda-msg.bot a.veda-portal-btn.veda-btn-crystal:hover,
.veda-portal-btn.veda-btn-crystal:hover,
.veda-msg.bot a:not(.veda-btn-primary):hover,
.veda-portal-btn:not(.veda-btn-primary):hover {
    background: linear-gradient(135deg, #ffffff 0%, #fffbeb 100%) !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
    transform: translateY(-2px) !important;
    box-shadow: 
        0 6px 20px rgba(245, 158, 11, 0.2),
        0 2px 5px rgba(0, 0, 0, 0.04),
        inset 0 1.5px 1.5px rgba(255, 255, 255, 1) !important;
}

.veda-msg.bot a.veda-portal-btn.veda-btn-crystal:active,
.veda-portal-btn.veda-btn-crystal:active,
.veda-msg.bot a:not(.veda-btn-primary):active,
.veda-portal-btn:not(.veda-btn-primary):active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

/* ── Compact content spacing inside bot bubbles ── */
.veda-msg.bot p {
    margin: 0 0 4px 0;
    line-height: 1.45;
}
.veda-msg.bot p:last-child {
    margin-bottom: 0;
}
.veda-msg.bot ul,
.veda-msg.bot ol {
    margin: 3px 0 3px 0;
    padding-left: 16px;
}
.veda-msg.bot li {
    margin-bottom: 2px;
    line-height: 1.4;
}
.veda-msg.bot li:last-child {
    margin-bottom: 0;
}
.veda-msg.bot br + br {
    display: none; /* collapse double line breaks */
}

/* Animated Blinking Amber Cursor */
.veda-typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.05em;
    background: #d97706;
    margin-left: 2px;
    vertical-align: -1px;
    animation: vedaCursorBlink 0.6s infinite alternate;
    border-radius: 1px;
}

@keyframes vedaCursorBlink {
    0% { opacity: 0.15; }
    100% { opacity: 1; }
}

/* Modern Bouncing Dots Typing Indicator */
.veda-typing-indicator {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 9px 14px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: vedaFadeIn 0.25s ease-out;
}

.veda-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.veda-typing-dots .dot {
    width: 6px;
    height: 6px;
    background-color: #f59e0b;
    border-radius: 50%;
    display: inline-block;
    animation: vedaDotBounce 1.3s infinite ease-in-out both;
}

.veda-typing-dots .dot:nth-child(1) {
    animation-delay: -0.32s;
}
.veda-typing-dots .dot:nth-child(2) {
    animation-delay: -0.16s;
}
.veda-typing-dots .dot:nth-child(3) {
    animation-delay: 0s;
}

@keyframes vedaDotBounce {
    0%, 80%, 100% {
        transform: scale(0.4);
        opacity: 0.35;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
        background-color: #d97706;
    }
}

.veda-typing-label {
    font-size: 0.76rem;
    color: #64748b;
    font-style: italic;
    font-weight: 500;
}

/* Smooth Fade-in Animation */
@keyframes vedaFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.veda-fade-in {
    animation: vedaFadeIn 0.35s ease-out forwards;
}

/* Quick Prompt Chips */
.veda-ai-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    scrollbar-width: none;
}
.veda-ai-chips::-webkit-scrollbar { display: none; }

.veda-chip {
    white-space: nowrap;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.veda-chip:hover {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #78350f;
    transform: translateY(-1px);
}

/* Chat Input Footer */
.veda-ai-drawer-footer {
    padding: 10px 12px;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

.veda-ai-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 5px 6px 5px 14px;
    transition: all 0.2s;
}

.veda-ai-input-wrap:focus-within {
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.veda-ai-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    color: #0f172a;
    font-size: 0.84rem;
    outline: none;
}

.veda-ai-input-wrap input::placeholder {
    color: #94a3b8;
}

.veda-ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
}

.veda-ai-send-btn:hover {
    transform: scale(1.08);
}

/* Assistant Engine Branding Bar */
.veda-ai-escalate-bar {
    text-align: center;
    padding: 6px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
}

/* Embedded Birth Form Card (Light Theme) */
.veda-birth-card {
    background: #ffffff;
    border: 1.5px solid #fcd34d;
    border-radius: 14px;
    padding: 12px;
    margin: 8px 0;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.veda-birth-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.veda-birth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.veda-birth-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.veda-birth-field.full-width {
    grid-column: span 2;
}

.veda-birth-field label {
    font-size: 0.68rem;
    color: #475569;
    font-weight: 600;
}

.veda-birth-input {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    padding: 5px 8px;
    font-size: 0.76rem;
    outline: none;
    transition: border-color 0.2s;
}

.veda-birth-input:focus {
    background: #ffffff;
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.veda-birth-submit {
    width: 100%;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25);
    transition: all 0.2s;
}

.veda-birth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(217, 119, 6, 0.4);
}

/* Portal Feature Link Card (Light Theme) */
.veda-portal-card {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px;
    margin-top: 8px;
}

.veda-portal-title {
    font-size: 0.83rem;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
}

.veda-portal-desc {
    font-size: 0.74rem;
    color: #334155;
    line-height: 1.4;
    margin-bottom: 8px;
}



/* Moderation Warning Card (Light Theme) */
.veda-warning-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 8px 10px;
    margin: 6px 0;
    font-size: 0.76rem;
    color: #9a3412;
}

/* Moderation Blocked Overlay (Light Theme) */
.veda-blocked-overlay {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.veda-blocked-icon {
    font-size: 2.4rem;
    color: #ef4444;
    margin-bottom: 12px;
}

.veda-blocked-title {
    font-size: 1rem;
    font-weight: 700;
    color: #b91c1c;
    margin-bottom: 8px;
}

.veda-blocked-desc {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.45;
}

/* Responsive adjustment */
@media (max-width: 576px) {
    .veda-ai-float-btn {
        bottom: 16px;
        left: 16px;
        padding: 6px;
    }
    .veda-ai-float-text {
        display: none;
    }
    .veda-ai-drawer {
        left: 12px;
        bottom: 72px;
        width: calc(100vw - 24px);
        height: 490px;
    }
}
