/* ============================================================
   HOSPITAL LINK - BOT CHAT WIDGET STYLING
   ============================================================ */

:root {
    --bot-primary: #0056b3;
    --bot-user-bubble: #0056b3;
    --bot-bg: #ffffff;
    --bot-bubble-bot: #f1f5f9;
    --bot-text: #0f172a;
    --bot-text-muted: #64748b;
    --bot-border: #e2e8f0;
    --bot-shadow: 0 12px 36px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Floating Launcher Button - Compact Rectangular Help Desk */
.hospital-bot-launcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 38px;
    padding: 0 14px 0 12px;
    border-radius: 8px;
    background: #091a32;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 16px rgba(9, 26, 50, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    z-index: 99999;
    transition: all 0.2s ease;
    outline: none;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.hospital-bot-launcher:hover {
    background: #0056b3;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 179, 0.35);
}

.hospital-bot-launcher:active {
    transform: scale(0.97);
}

.hospital-bot-launcher .launcher-content-open {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.hospital-bot-launcher .launcher-content-open .launcher-icon {
    font-size: 1.05rem;
    line-height: 1;
}

.hospital-bot-launcher .launcher-text {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.hospital-bot-launcher .launcher-icon-close {
    font-size: 1.05rem;
    line-height: 1;
    display: none;
}

.hospital-bot-launcher.open {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.hospital-bot-launcher.open .launcher-content-open {
    display: none;
}

.hospital-bot-launcher.open .launcher-icon-close {
    display: block;
}

/* Notification badge on launcher */
.bot-launcher-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


/* Floating Chat Window */
.hospital-bot-widget {
    position: fixed;
    bottom: 68px;
    right: 20px;
    width: 405px;
    max-width: calc(100vw - 32px);
    height: 660px;
    max-height: calc(100vh - 85px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: var(--bot-shadow);
    display: flex;
    flex-direction: column;
    z-index: 99999;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hospital-bot-widget.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header - Ultra Modern Medical Slate & Glassmorphism Design */
.bot-widget-header {
    background: #091a32;
    color: #ffffff;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.16);
}

.bot-widget-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0056b3;
}

.bot-profile-info {
    display: flex;
    align-items: center;
    gap: 11px;
}

.bot-avatar-wrapper {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.bot-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.bot-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    background: #22c55e;
    border: 2px solid #091a32;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.7);
}

.bot-header-titles {
    display: flex;
    flex-direction: column;
}

.bot-header-titles h4 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: -0.2px;
    color: #ffffff;
    line-height: 1.2;
}

.bot-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.72rem;
    color: #38bdf8;
    font-weight: 500;
    margin-top: 2px;
}

.bot-live-dot {
    width: 6px;
    height: 6px;
    background: #38bdf8;
    border-radius: 50%;
    animation: livePulse 2s infinite ease-in-out;
}

@keyframes livePulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.bot-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bot-action-btn {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
}

.bot-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.06) translateY(-1px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.bot-lang-btn {
    background: #152e4d;
    border: 1px solid #234570;
    color: #e0f2fe;
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bot-lang-btn:hover {
    background: #1d406a;
    border-color: #3b82f6;
    color: #ffffff;
    transform: scale(1.05) translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 86, 179, 0.2);
}

/* Chat Messages Area */
.bot-widget-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.bot-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 88%;
    animation: fadeInMsg 0.25s ease forwards;
}

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

.bot-msg-row.bot {
    align-self: flex-start;
}

.bot-msg-row.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.bot-msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--bot-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bot-msg-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.bot-msg-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
}

.bot-msg-row.bot .bot-msg-bubble {
    background: #ffffff;
    color: var(--bot-text);
    border: 1px solid var(--bot-border);
    border-top-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bot-msg-row.user .bot-msg-bubble {
    background: #0056b3;
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 86, 179, 0.2);
}

.bot-msg-time {
    font-size: 0.68rem;
    margin-top: 4px;
    opacity: 0.7;
    text-align: right;
}

/* Embedded Welcome Suggestion Chips inside the initial Greeting Bubble */
.bot-welcome-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed rgba(203, 213, 225, 0.8);
}

.bot-welcome-chip {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.78rem;
    font-weight: 550;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1.3;
    user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

.bot-welcome-chip:hover {
    background: #eff6ff;
    color: #0056b3;
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 86, 179, 0.12);
}

.bot-welcome-chip:active {
    transform: scale(0.97);
}

.bot-welcome-chip.whatsapp-chip {
    background: #25d366;
    color: #ffffff;
    border-color: #128c7e;
    font-weight: 600;
}

.bot-welcome-chip.whatsapp-chip:hover {
    background: #128c7e;
    color: #ffffff;
    border-color: #075e54;
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.28);
}

/* Typing Indicator */
.bot-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--bot-border);
    border-radius: 16px;
    border-top-left-radius: 4px;
    width: fit-content;
}

.bot-typing-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    animation: botTypingDot 1.4s infinite ease-in-out both;
}

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

@keyframes botTypingDot {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Footer & Input */
.bot-widget-footer {
    padding: 12px 14px;
    background: #ffffff;
    border-top: 1px solid var(--bot-border);
}

.bot-input-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px 6px 4px 14px;
    border-radius: 24px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.bot-input-form:focus-within {
    background: #ffffff;
    border-color: var(--bot-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bot-input-field {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 0.88rem;
    color: var(--bot-text);
    outline: none;
    padding: 6px 0;
}

.bot-input-field::placeholder {
    color: var(--bot-text-muted);
}

.bot-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bot-primary);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.bot-send-btn:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.bot-send-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Footer Branding - Powered by Biasharanasi */
.bot-footer-branding {
    text-align: center;
    font-size: 0.70rem;
    color: #94a3b8;
    margin-top: 6px;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    user-select: none;
}

.bot-footer-branding .bot-brand-highlight {
    font-weight: 700;
    color: #0056b3;
    letter-spacing: 0.2px;
}

/* ============================================================
   LIVE TICKET CONNECTING CARD & RADAR ANIMATION
   ============================================================ */
.bot-ticket-connecting-card {
    margin: 8px 0 12px;
    padding: 12px 14px;
    background: rgba(241, 245, 249, 0.75);
    backdrop-filter: blur(8px);
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.35s ease;
    animation: fadeInCard 0.4s ease;
}

.bot-ticket-connecting-card.seen {
    background: rgba(236, 253, 245, 0.85);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.bot-radar-box {
    position: relative;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bot-radar-core {
    width: 14px;
    height: 14px;
    background: #0088ea;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 136, 234, 0.6);
    z-index: 2;
    transition: background 0.3s;
}

.bot-ticket-connecting-card.seen .bot-radar-core {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
}

.bot-radar-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 136, 234, 0.5);
    animation: radarWave 1.8s infinite cubic-bezier(0.215, 0.61, 0.355, 1);
}

.bot-radar-wave.delayed {
    animation-delay: 0.9s;
}

.bot-ticket-connecting-card.seen .bot-radar-wave {
    border-color: rgba(16, 185, 129, 0.5);
}

@keyframes radarWave {
    0% {
        width: 14px;
        height: 14px;
        opacity: 0.9;
    }
    100% {
        width: 38px;
        height: 38px;
        opacity: 0;
    }
}

.bot-connecting-info {
    flex: 1;
}

.bot-connecting-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

.bot-ticket-connecting-card.seen .bot-connecting-title {
    color: #065f46;
}

.bot-connecting-desc {
    font-size: 0.72rem;
    color: #64748b;
    line-height: 1.35;
}

.bot-ticket-connecting-card.seen .bot-connecting-desc {
    color: #047857;
}

.bot-connecting-dots {
    display: inline-flex;
    gap: 2px;
    margin-left: 2px;
}

.bot-connecting-dots span {
    width: 3px;
    height: 3px;
    background: #64748b;
    border-radius: 50%;
    animation: connectingDotPulse 1.4s infinite;
}

.bot-connecting-dots span:nth-child(2) { animation-delay: 0.2s; }
.bot-connecting-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes connectingDotPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

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

/* Responsive adjustment */
@media (max-width: 480px) {
    .hospital-bot-widget {
        bottom: 85px;
        right: 12px;
        width: calc(100vw - 24px);
        height: calc(100vh - 110px);
    }
    .hospital-bot-launcher {
        bottom: 18px;
        right: 18px;
    }
}

/* ============================================================
   TICKET RESUME BAR & ACTIVE TICKET BANNER
   ============================================================ */
.bot-ticket-resume-bar {
    background: #0f2744;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 12px;
    animation: slideDownBar 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

@keyframes slideDownBar {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-ticket-bar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 4px 8px;
    transition: all 0.2s ease;
}

.bot-ticket-bar-inner:focus-within {
    background: rgba(255, 255, 255, 0.18);
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.bot-ticket-bar-inner i.bi-ticket-perforated {
    color: #38bdf8;
    font-size: 1rem;
}

.bot-ticket-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 500;
}

.bot-ticket-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.bot-ticket-submit-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.bot-ticket-submit-btn:hover {
    background: #0369a1;
    transform: scale(1.04);
}

.bot-ticket-submit-btn:disabled {
    background: rgba(255, 255, 255, 0.2);
    cursor: not-allowed;
    transform: none;
}

.bot-ticket-close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.bot-ticket-close-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
}

/* Active Ticket Sticky Indicator */
.bot-active-ticket-pill {
    background: linear-gradient(135deg, #064e3b, #047857);
    color: #ecfdf5;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 4px 0 10px;
    border: 1px solid rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.2);
    animation: fadeInCard 0.3s ease;
}

.bot-active-ticket-pill .ticket-tag {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.bot-active-ticket-pill .ticket-leave-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bot-active-ticket-pill .ticket-leave-btn:hover {
    background: rgba(239, 68, 68, 0.8);
    border-color: #ef4444;
}

/* Support Auth / Contact Prompt Card */
.bot-support-auth-card {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 0 12px;
    color: #f8fafc;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    animation: fadeInCard 0.3s ease;
}

.bot-support-card-header {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: #38bdf8;
    margin-bottom: 6px;
}

.bot-support-card-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 12px;
    line-height: 1.4;
}

.bot-support-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-support-form .bot-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bot-support-form .bot-form-group label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bot-support-form .bot-support-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 8px 12px;
    color: #ffffff;
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s ease;
}

.bot-support-form .bot-support-input:focus {
    border-color: #38bdf8;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.bot-support-form .bot-support-input::placeholder {
    color: #64748b;
    font-size: 0.78rem;
}

.bot-support-submit-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 4px;
    transition: all 0.2s ease;
}

.bot-support-submit-btn:hover {
    background: linear-gradient(135deg, #0369a1, #075985);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.bot-support-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

/* Ticket Rating Interactive Card */
.bot-ticket-rating-card {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 14px;
    padding: 14px 16px;
    margin: 10px 0;
    color: #f8fafc;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
    animation: fadeInCard 0.3s ease;
    text-align: center;
}

.bot-rating-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 6px;
}

.bot-rating-desc {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-bottom: 12px;
    line-height: 1.4;
}

.bot-rating-stars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
}

.bot-star-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.4rem;
    color: #94a3b8;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    outline: none;
}

.bot-star-btn:hover,
.bot-star-btn.hovered {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.18);
    border-color: #fbbf24;
    transform: scale(1.18);
}

.bot-star-btn.active {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    transform: scale(1.05);
}

.bot-star-btn:disabled {
    cursor: default;
}

.bot-rating-feedback {
    margin-top: 8px;
    animation: fadeInCard 0.25s ease;
}

.bot-rating-success-msg {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ============================================================
 * ATTACHMENT STYLES (Images, PDF, Word Documents - Max 5MB)
 * ============================================================ */
.bot-attach-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: #64748b;
    border: none;
    display: none; /* Shown dynamically only when connected to live agent */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.18rem;
    flex-shrink: 0;
    margin-right: 2px;
}

.bot-attach-btn:hover {
    background: #e2e8f0;
    color: var(--bot-primary);
    transform: scale(1.1);
}

.bot-attach-btn:active {
    transform: scale(0.95);
}

/* Selected Attachment Preview Strip */
.bot-attachment-preview-bar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px 10px;
    margin-bottom: 8px;
    animation: botSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.bot-attachment-thumb {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #475569;
    overflow: hidden;
    flex-shrink: 0;
}

.bot-attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bot-attachment-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.bot-attachment-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.bot-attachment-size {
    font-size: 0.68rem;
    color: #64748b;
}

.bot-attachment-remove-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-attachment-remove-btn:hover {
    color: #ef4444;
    transform: scale(1.15);
}

/* Attachment in Chat Bubble */
.bot-msg-attachment {
    margin-top: 6px;
    border-radius: 10px;
    overflow: hidden;
}

.bot-attachment-img {
    max-width: 100%;
    max-height: 220px;
    border-radius: 8px;
    display: block;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.bot-attachment-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.bot-msg-attachment-doc {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.bot-msg-row.user .bot-msg-attachment-doc {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
}

.bot-doc-icon {
    font-size: 1.35rem;
    line-height: 1;
    flex-shrink: 0;
}

.bot-doc-icon.pdf { color: #ef4444; }
.bot-doc-icon.doc { color: #2563eb; }
.bot-doc-icon.xls { color: #10b981; }
.bot-doc-icon.file { color: #64748b; }
.bot-msg-row.user .bot-doc-icon { color: #ffffff; }

.bot-doc-info {
    flex: 1;
    min-width: 0;
}

.bot-doc-name {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.bot-doc-size {
    font-size: 0.68rem;
    opacity: 0.82;
}

.bot-doc-dl-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.bot-doc-dl-btn:hover {
    background: var(--bot-primary);
    color: #ffffff !important;
    transform: scale(1.1);
}

.bot-msg-row.user .bot-doc-dl-btn {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.bot-msg-row.user .bot-doc-dl-btn:hover {
    background: #ffffff;
    color: #0056b3 !important;
}

/* ============================================================
   CUSTOM BOT MODAL & CONFIRMATION DIALOG (MODERN UI)
   ============================================================ */
.bot-custom-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    border-radius: inherit;
}

.bot-custom-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bot-custom-modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 340px;
    border-radius: 20px;
    padding: 24px 20px 20px;
    box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(226, 232, 240, 0.8);
    text-align: center;
    transform: scale(0.9) translateY(10px);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.bot-custom-modal-backdrop.active .bot-custom-modal-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.bot-modal-icon-badge {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    position: relative;
}

.bot-modal-icon-badge.danger {
    background: #fef2f2;
    color: #ef4444;
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.12);
}

.bot-modal-icon-badge.warning {
    background: #fffbeb;
    color: #f59e0b;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

.bot-modal-icon-badge.info {
    background: #eff6ff;
    color: #0056b3;
    box-shadow: 0 0 0 6px rgba(0, 86, 179, 0.12);
}

.bot-modal-icon-badge.success {
    background: #f0fdf4;
    color: #16a34a;
    box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.12);
}

.bot-modal-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.bot-modal-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
}

.bot-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.bot-modal-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    outline: none;
}

.bot-modal-btn:active {
    transform: scale(0.97);
}

.bot-modal-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.bot-modal-btn-cancel:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.bot-modal-btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.bot-modal-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
    color: #ffffff;
}

.bot-modal-btn-primary {
    background: linear-gradient(135deg, #0056b3, #004494);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(0, 86, 179, 0.35);
}

.bot-modal-btn-primary:hover {
    background: linear-gradient(135deg, #004494, #003366);
    color: #ffffff;
}

/* ============================================================
   BOT TOAST NOTIFICATIONS
   ============================================================ */
.bot-custom-toast {
    position: absolute;
    top: 65px;
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    background: #0f172a;
    color: #ffffff;
    padding: 9px 16px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.25);
    z-index: 2100;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.bot-custom-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.bot-custom-toast.success {
    background: #15803d;
    box-shadow: 0 10px 25px -3px rgba(21, 128, 61, 0.4);
}

.bot-custom-toast.info {
    background: #0056b3;
    box-shadow: 0 10px 25px -3px rgba(0, 86, 179, 0.4);
}

.bot-custom-toast.warning {
    background: #d97706;
    box-shadow: 0 10px 25px -3px rgba(217, 119, 6, 0.4);
}

.bot-custom-toast.danger {
    background: #dc2626;
    box-shadow: 0 10px 25px -3px rgba(220, 38, 38, 0.4);
}

/* ============================================================
   BOT COMMANDS & HELP GUIDE MODAL (INTERACTIVE CHEATSHEET)
   ============================================================ */
.bot-help-guide-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 26, 50, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    border-radius: inherit;
    overflow: hidden;
}

.bot-help-guide-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.bot-help-guide-card {
    background: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(15px) scale(0.98);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.bot-help-guide-backdrop.active .bot-help-guide-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.bot-help-guide-header {
    background: #091a32;
    color: #ffffff;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.bot-help-header-title-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bot-help-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.bot-help-header-text h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.bot-help-header-text p {
    margin: 0;
    font-size: 0.7rem;
    color: #94a3b8;
}

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

.bot-help-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.bot-help-toolbar {
    padding: 10px 14px 6px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.bot-help-search-input-wrapper {
    position: relative;
    margin-bottom: 8px;
}

.bot-help-search-input-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.85rem;
}

.bot-help-search-input {
    width: 100%;
    padding: 7px 10px 7px 32px;
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    font-size: 0.8rem;
    outline: none;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.bot-help-search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.bot-help-categories-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.bot-help-categories-scroll::-webkit-scrollbar {
    display: none;
}

.bot-help-cat-chip {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    background: #ffffff;
    color: #475569;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.bot-help-cat-chip:hover,
.bot-help-cat-chip.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.bot-help-body-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bot-help-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.bot-help-group-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bot-help-group-title i {
    color: #2563eb;
}

.bot-help-command-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: all 0.2s ease;
}

.bot-help-command-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.bot-help-cmd-left {
    flex: 1;
    min-width: 0;
}

.bot-help-cmd-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 3px;
    cursor: pointer;
    transition: background 0.15s;
}

.bot-help-cmd-pill:hover {
    background: #dbeafe;
}

.bot-help-cmd-desc {
    font-size: 0.73rem;
    color: #64748b;
    line-height: 1.3;
    margin: 0;
}

.bot-help-try-btn {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 0.74rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
}

.bot-help-try-btn:hover {
    background: #1d4ed8;
    transform: scale(1.04);
}



