/* ==========================================================================
   AI MARKETING EXPERTS - AI CHATBOT RIGHT SIDEBAR COMPONENT
   Smooth full-height slide-over sidebar with desktop global page squeeze
   ========================================================================== */

:root {
    --dh-sidebar-width: 440px;
    --dh-primary: #2563eb;
    --dh-primary-hover: #1d4ed8;
    --dh-accent: #3b82f6;
    --dh-dark: #0f172a;
    --dh-sidebar-bg: #ffffff;
    --dh-stream-bg: #f8fafc;
    --dh-card-bg: #ffffff;
    --dh-card-border: rgba(37, 99, 235, 0.12);
    --dh-card-border-hover: #2563eb;
    --dh-text-main: #0f172a;
    --dh-text-muted: #64748b;
    --dh-sidebar-shadow: -12px 0 45px rgba(15, 23, 42, 0.12);
}

/* ==========================================================================
   GLOBAL SITE SQUEEZE ON DESKTOP (Smooth shift like digitalhive)
   ========================================================================== */

@media (min-width: 992px) {
    body {
        transition: margin-right 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                    max-width 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
        position: relative;
    }

    body.dh-chat-open {
        margin-right: var(--dh-sidebar-width) !important;
        max-width: calc(100% - var(--dh-sidebar-width)) !important;
    }

    body.dh-chat-open .navbar-area {
        left: calc((100% - var(--dh-sidebar-width)) / 2) !important;
        transform: translateX(-50%) !important;
        width: calc(100% - var(--dh-sidebar-width) - 2rem) !important;
        max-width: calc(100% - var(--dh-sidebar-width) - 2rem) !important;
        padding: 0.38rem 1rem !important;
        transition: all 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    body.dh-chat-open .navbar-area .logo-brand img {
        height: 38px !important;
    }

    body.dh-chat-open .navbar-area .nav-links {
        gap: 0.12rem !important;
    }

    body.dh-chat-open .navbar-area .nav-links li a {
        font-size: 0.78rem !important;
        padding: 0.38rem 0.48rem !important;
        gap: 0.2rem !important;
    }

    body.dh-chat-open .navbar-area .nav-links li a.cta-btn {
        font-size: 0.78rem !important;
        padding: 0.48rem 0.95rem !important;
        margin-left: 0.25rem !important;
    }
}

/* Seamless Mobile Menu Switch when sidebar is open on medium/standard desktop screens */
@media (min-width: 992px) and (max-width: 1480px) {
    body.dh-chat-open .navbar-area .nav-links {
        display: none !important;
    }

    body.dh-chat-open .navbar-area .mobile-nav-toggle {
        display: flex !important;
    }
}

/* ==========================================================================
   FLOATING LAUNCHER TRIGGER PILL (When sidebar is closed)
   ========================================================================== */

.dh-chat-trigger {
    position: fixed;
    bottom: 28px;
    right: 28px;
    height: 48px;
    padding: 0 20px 0 18px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(37, 99, 235, 0.22);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 999990;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    font-family: inherit;
}

.dh-chat-trigger:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28), 0 0 0 1.5px #2563eb;
    background: #ffffff;
}

.dh-trigger-sparkle {
    color: #2563eb;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.dh-trigger-text {
    color: #0f172a;
    font-family: inherit;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.dh-trigger-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: dhPulseAnimation 2s infinite;
}

/* Hide launcher when sidebar is open or mobile menu is active */
body.dh-chat-open .dh-chat-trigger,
body.mobile-menu-open .dh-chat-trigger,
body.mobile-menu-open .dh-chat-sidebar {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: scale(0.6) translateY(20px) !important;
    pointer-events: none !important;
}

/* ==========================================================================
   FULL-HEIGHT RIGHT SIDEBAR
   ========================================================================== */

.dh-chat-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--dh-sidebar-width);
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    background: var(--dh-sidebar-bg);
    border-left: 1px solid rgba(37, 99, 235, 0.14);
    box-shadow: var(--dh-sidebar-shadow);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: inherit;
}

body.dh-chat-open .dh-chat-sidebar {
    transform: translateX(0);
}

/* WordPress Admin Bar Compatibility */
body.admin-bar .dh-chat-sidebar {
    top: 32px !important;
    height: calc(100vh - 32px) !important;
    max-height: calc(100vh - 32px) !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar .dh-chat-sidebar {
        top: 46px !important;
        height: calc(100vh - 46px) !important;
        max-height: calc(100vh - 46px) !important;
    }
}

/* ==========================================================================
   SIDEBAR HEADER
   ========================================================================== */

.dh-sidebar-header {
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid rgba(37, 99, 235, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.dh-sidebar-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dh-avatar-wrapper {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.dh-sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
    background: #ffffff;
    padding: 2px;
    border: 1.5px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.dh-online-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 11px;
    height: 11px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}

.dh-sidebar-title-box {
    display: flex;
    flex-direction: column;
}

.dh-sidebar-title-box .dh-sidebar-name {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: inherit;
    line-height: 1.2;
}

.dh-sidebar-subrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.dh-sidebar-title-box .dh-sidebar-role {
    font-size: 10.5px;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.6px;
}

.dh-sidebar-title-box .dh-sidebar-status {
    font-size: 9.5px;
    font-weight: 700;
    color: #10b981;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dh-status-pulsing-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    display: inline-block;
    animation: dhPulseAnimation 2s infinite;
}

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

.dh-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid rgba(37, 99, 235, 0.12);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13.5px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.dh-action-btn:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: scale(1.06);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   SIDEBAR MESSAGES & PROMPTS STREAM
   ========================================================================== */

.dh-sidebar-messages {
    flex: 1;
    padding: 18px 18px 24px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--dh-stream-bg);
    scroll-behavior: smooth;
}

.dh-sidebar-messages::-webkit-scrollbar {
    width: 5px;
}

.dh-sidebar-messages::-webkit-scrollbar-track {
    background: transparent;
}

.dh-sidebar-messages::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.15);
    border-radius: 10px;
}

/* ==========================================================================
   WELCOME INTRO CARD
   ========================================================================== */

.dh-welcome-card {
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 18px;
    padding: 18px 18px 16px 18px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.04);
    position: relative;
    overflow: visible;
    flex-shrink: 0;
}

.dh-welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 10px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

.dh-welcome-heading {
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    margin-bottom: 8px;
}

.dh-welcome-heading strong {
    color: #2563eb;
}

.dh-welcome-text {
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--dh-text-muted);
    margin: 0 0 10px 0;
}

.dh-welcome-hint {
    font-size: 11.5px;
    color: #64748b;
    font-style: italic;
    padding-top: 8px;
    border-top: 1px dashed rgba(37, 99, 235, 0.12);
    line-height: 1.4;
}

/* ==========================================================================
   PROMPTS SECTION ("HOW CAN I HELP YOU TODAY?")
   ========================================================================== */

.dh-quick-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.dh-section-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #64748b;
    margin-bottom: 4px;
    padding-left: 2px;
}

.dh-prompts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dh-prompt-card {
    background: var(--dh-card-bg);
    border: 1.5px solid var(--dh-card-border);
    border-radius: 14px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.03);
    outline: none;
    width: 100%;
    font-family: inherit;
}

.dh-prompt-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

/* Distinct Colorful Icon Palettes */
.prompt-card-audit .dh-prompt-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.18));
    color: #2563eb;
}
.prompt-card-services .dh-prompt-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 182, 212, 0.18));
    color: #059669;
}
.prompt-card-leadgen .dh-prompt-icon {
    background: linear-gradient(135deg, rgba(239, 177, 14, 0.14), rgba(245, 158, 11, 0.2));
    color: #d97706;
}
.prompt-card-aeo .dh-prompt-icon {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.14), rgba(217, 70, 239, 0.2));
    color: #9333ea;
}
.prompt-card-meeting .dh-prompt-icon {
    background: linear-gradient(135deg, rgba(244, 63, 94, 0.12), rgba(251, 113, 133, 0.18));
    color: #e11d48;
}

.dh-prompt-info {
    flex: 1;
}

.dh-prompt-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #0f172a;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.dh-prompt-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
    line-height: 1.3;
}

.dh-prompt-arrow {
    color: #94a3b8;
    font-size: 11px;
    transition: all 0.22s ease;
    padding-right: 2px;
}

.dh-prompt-card:hover {
    border-color: #2563eb;
    transform: translateX(4px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
    background: #ffffff;
}

.dh-prompt-card:hover .dh-prompt-icon {
    transform: scale(1.08);
}

.dh-prompt-card:hover .dh-prompt-title {
    color: #2563eb;
}

.dh-prompt-card:hover .dh-prompt-arrow {
    color: #2563eb;
    transform: translateX(3px);
}

/* ==========================================================================
   CHAT MESSAGES - NATURAL CONVERSATIONAL UI
   ========================================================================== */

.dh-message {
    max-width: 88%;
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    animation: dhMessageFadeIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.dh-message.bot {
    align-self: flex-start;
    align-items: flex-start;
}

.dh-message.user {
    align-self: flex-end;
    align-items: flex-end;
    flex-direction: row-reverse;
}

.dh-bot-avatar-mini {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 3px;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.dh-bot-avatar-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.dh-message .message-body {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

/* Base DM Bubble */
.dh-message .message-content {
    position: relative;
    padding: 14px 16px 10px 16px;
    font-size: 13.5px;
    line-height: 1.62;
    word-break: break-word;
}

/* Bot DM Bubble (Left) - Pops Out with Glass Card Styling */
.dh-message.bot .message-content {
    background: #ffffff;
    color: #0f172a;
    border-radius: 18px 18px 18px 4px;
    border: 1.5px solid rgba(37, 99, 235, 0.12);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.dh-bot-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.dh-bot-sparkle {
    color: #2563eb;
    font-size: 11px;
    display: flex;
    align-items: center;
}

.dh-bot-title {
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.3px;
}

.dh-bot-role-pill {
    font-size: 9px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    padding: 2px 7px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    margin-left: auto;
}

.dh-message.bot .message-content strong {
    color: #0f172a;
    font-weight: 800;
}

/* User DM Bubble (Right) - Pops Out with Rich Gradient & Shadow */
.dh-message.user .message-content {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28);
    padding: 11px 16px 8px 16px;
    font-weight: 500;
}

.dh-chat-p {
    margin: 0 0 8px 0;
}

.dh-chat-p:last-child {
    margin-bottom: 0;
}

.dh-message .message-text {
    margin-bottom: 3px;
}

/* Embedded DM Meta (Timestamp & Read Receipts) */
.dh-dm-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.dh-dm-author-tag {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.dh-dm-author-tag.user-tag {
    color: rgba(255, 255, 255, 0.92);
}

.dh-dm-dot {
    font-size: 9px;
    opacity: 0.7;
    margin: 0 1px;
    color: rgba(255, 255, 255, 0.7);
}

.dh-dm-time {
    font-size: 10px;
    font-weight: 500;
}

.dh-message.user .dh-dm-time {
    color: rgba(255, 255, 255, 0.85);
}

.dh-message.bot .dh-dm-time {
    color: #64748b;
}

.dh-read-receipt {
    font-size: 10px;
    color: #a8ffb2;
    display: inline-flex;
    align-items: center;
    margin-left: 1px;
}

/* Interactive Email & Link Pills */
.dh-chat-email-pill,
.dh-chat-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb !important;
    font-weight: 700;
    font-size: 12px;
    padding: 3px 9px;
    border-radius: 20px;
    border: 1px solid rgba(37, 99, 235, 0.18);
    margin: 3px 0;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.dh-chat-email-pill:hover,
.dh-chat-link-pill:hover {
    background: #2563eb;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Direct Page Redirection Cards inside Messenger */
.dh-chat-redirect-card {
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 10px 12px;
    margin: 8px 0 4px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
    transition: all 0.25s ease;
}

.dh-chat-redirect-card:hover {
    border-color: #2563eb;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
}

.dh-redirect-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.dh-redirect-badge {
    font-size: 9px;
    font-weight: 800;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dh-redirect-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.dh-redirect-desc {
    font-size: 11px;
    color: #64748b;
    line-height: 1.3;
}

.dh-redirect-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #2563eb;
    color: #ffffff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dh-redirect-btn:hover {
    background: #1d4ed8;
    transform: translateX(2px);
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.35);
}

/* Bullet Points & Paragraph Spacing */
.dh-chat-bullet {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 0;
    line-height: 1.45;
}

.dh-bullet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2563eb;
    margin-top: 7px;
    flex-shrink: 0;
}

.dh-bullet-num {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    font-weight: 800;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.dh-msg-copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    font-size: 11px;
    padding: 0 2px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.dh-message.bot:hover .dh-msg-copy-btn {
    opacity: 1;
}

.dh-msg-copy-btn:hover {
    color: #2563eb;
}

/* Typing Indicator */
.dh-typing-indicator {
    background: #ffffff;
    border: 1px solid rgba(37, 99, 235, 0.1);
    padding: 10px 14px;
    border-radius: 18px 18px 18px 4px;
    display: inline-flex;
    gap: 5px;
    align-items: center;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.dh-typing-dot {
    width: 6px;
    height: 6px;
    background-color: #2563eb;
    border-radius: 50%;
    opacity: 0.4;
    animation: dhTypingAnimation 1.4s infinite ease-in-out;
}

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

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

.dh-typing-text {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
    margin-left: 4px;
}

/* ==========================================================================
   SIDEBAR FIXED BOTTOM INPUT
   ========================================================================== */

.dh-sidebar-input-area {
    padding: 14px 18px 12px 18px;
    background: #ffffff;
    border-top: 1px solid rgba(37, 99, 235, 0.08);
    flex-shrink: 0;
}

.dh-input-box {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1.5px solid rgba(37, 99, 235, 0.14);
    border-radius: 30px;
    padding: 4px 6px 4px 15px;
    transition: all 0.3s ease;
}

.dh-input-box:focus-within {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#dh-chat-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    outline: none;
    color: var(--dh-text-main);
    padding: 7px 0;
    font-family: inherit;
}

#dh-chat-input::placeholder {
    color: #94a3b8;
}

#dh-chat-submit {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

#dh-chat-submit:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.dh-sidebar-brand {
    text-align: center;
    padding-top: 7px;
    font-size: 10px;
    letter-spacing: 0.6px;
    color: #94a3b8;
}

.dh-sidebar-brand strong {
    color: #2563eb;
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */

@keyframes dhPulseAnimation {
    0% { transform: scale(0.95); opacity: 0.8; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes dhTypingAnimation {
    0%, 100% { transform: translateY(0); opacity: 0.3; }
    50% { transform: translateY(-5px); opacity: 1; }
}

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

/* ==========================================================================
   FULLSCREEN & MOBILE FLOATING MODAL
   ========================================================================== */

/* Fullscreen Expansion Mode (Desktop + Mobile) */
.dh-chat-sidebar.dh-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    border: none !important;
    z-index: 9999999 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.dh-chat-sidebar.dh-fullscreen .dh-sidebar-messages {
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
}

.dh-chat-sidebar.dh-fullscreen .dh-sidebar-input-area {
    max-width: 920px;
    margin: 0 auto;
    width: 100%;
}

@media (max-width: 991px) {
    .dh-chat-sidebar {
        width: 100vw;
        max-width: 440px;
    }
}

/* Mobile Floating Card Mode (Like APS Waan) */
@media (max-width: 768px) {
    body.dh-chat-open {
        overflow: hidden;
    }

    .dh-chat-sidebar {
        position: fixed;
        bottom: 16px;
        right: 14px;
        left: 14px;
        top: auto;
        width: auto !important;
        max-width: calc(100vw - 28px) !important;
        height: min(640px, 84vh) !important;
        max-height: 84vh !important;
        border-radius: 24px;
        border: 1.5px solid rgba(37, 99, 235, 0.22);
        box-shadow: 0 24px 60px -10px rgba(15, 23, 42, 0.35), 0 0 0 1px rgba(37, 99, 235, 0.12);
        transform: translateY(120%) scale(0.95);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999999;
    }

    body.dh-chat-open .dh-chat-sidebar {
        transform: translateY(0) scale(1);
        opacity: 1;
        visibility: visible;
    }

    .dh-chat-sidebar.dh-fullscreen {
        inset: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        border: none !important;
        transform: translateY(0) scale(1) !important;
    }

    .dh-chat-trigger {
        bottom: 20px;
        right: 18px;
    }
}
