/* ==========================================================================
   AI Chatbot Concierge Styles — Debangshu Portfolio
   Theme: Glassmorphic Cyber-Blue Dark Mode
   ========================================================================== */

/* Floating Launcher Button */
.chatbot-launcher {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #121217;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 0 1.5px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.25);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9990;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none;
    overflow: hidden;
}

.chatbot-launcher:hover {
    transform: translateY(-4px) scale(1.08);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(56, 189, 248, 0.6), 0 0 30px rgba(168, 85, 247, 0.4);
}

.chatbot-launcher:active {
    transform: scale(0.95);
}

.chatbot-launcher-orb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.chatbot-launcher.is-open .chatbot-launcher-orb {
    display: none;
}

.chatbot-launcher svg.icon-close {
    display: none;
    width: 24px;
    height: 24px;
}

.chatbot-launcher.is-open svg.icon-close {
    display: block;
}

/* Launcher Tooltip / Badge */
.chatbot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #00ff88;
    border: 2px solid #060911;
    border-radius: 50%;
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

/* Chatbot Floating Window */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 400px;
    max-width: calc(100vw - 36px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #0d0d0f;
    border-radius: 24px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9991;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: fixed;
}

.chatbot-window.is-open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    padding: 16px 20px;
    background: #141418;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #141418;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.3), 0 0 12px rgba(56, 189, 248, 0.2);
}

.chatbot-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.73rem;
    color: #94A3B8;
}

.chatbot-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 6px #00ff88;
}

.chatbot-header-actions {
    display: flex;
    gap: 8px;
}

.chatbot-btn-icon {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chatbot-btn-icon:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages Container */
.chatbot-messages {
    flex: 1;
    padding: 16px 18px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
    background: #0d0d0f;
}

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

.chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* Message Bubble */
.chat-msg {
    display: flex;
    flex-direction: column;
    max-width: 86%;
    animation: fadeInMsg 0.3s ease-out;
}

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

.chat-msg.user {
    align-self: flex-end;
}

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

.chat-msg-bubble {
    padding: 12px 16px;
    font-size: 0.88rem;
    line-height: 1.5;
    border-radius: 16px;
    word-break: break-word;
}

.chat-msg.user .chat-msg-bubble {
    background: linear-gradient(135deg, #0066FF, #0052cc);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.25);
}

.chat-msg.bot .chat-msg-bubble {
    background: #18181c;
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #E2E8F0;
    border-bottom-left-radius: 4px;
}

.chat-msg.bot .chat-msg-bubble p {
    margin: 0 0 8px 0;
}

.chat-msg.bot .chat-msg-bubble p:last-child {
    margin-bottom: 0;
}

.chat-msg.bot .chat-msg-bubble ul, .chat-msg.bot .chat-msg-bubble ol {
    margin: 6px 0 8px 18px;
    padding: 0;
}

.chat-msg.bot .chat-msg-bubble li {
    margin-bottom: 4px;
}

.chat-msg.bot .chat-msg-bubble a {
    color: #38BDF8;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s;
}

.chat-msg.bot .chat-msg-bubble a:hover {
    color: #7DD3FC;
}

.chat-msg-time {
    font-size: 0.68rem;
    color: #64748B;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-msg.user .chat-msg-time {
    text-align: right;
}

/* Quick Prompt Suggestions */
.chatbot-quick-prompts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.quick-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
    color: #93C5FD;
    padding: 6px 12px;
    border-radius: 36px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.quick-chip:hover {
    background: rgba(0, 102, 255, 0.2);
    color: #ffffff;
    border-color: #3B82F6;
    transform: translateY(-1px);
}

/* Finding Status Pill with Thinking Orb (tball) */
.finding-status-wrapper {
    align-self: flex-start;
    animation: fadeInMsg 0.3s ease-out;
}

.chatbot-finding-status-pill {
    display: inline-flex;
    height: 48px;
    align-items: center;
    gap: 8px;
    border-radius: 9999px;
    padding-left: 6px;
    padding-right: 20px;
    background: rgba(29, 29, 29, 0.55);
    box-shadow: inset 0 0 0 1px rgba(44, 47, 54, 0.4), inset 0 0 50px 0 rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.finding-orb-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
}

.finding-label {
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
    color: rgba(251, 251, 251, 0.65);
    letter-spacing: 0.2px;
    user-select: none;
}

/* ==========================================================================
   BorderBeam AI Chat Input UI
   ========================================================================== */
.chatbot-footer {
    padding: 12px 14px 10px;
    background: #0d0d0f;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Outer Border Beam Glow Container */
.chat-input-beam-wrapper {
    position: relative;
    border-radius: 20px;
    padding: 1.5px;
    overflow: hidden;
    background: rgba(44, 47, 54, 0.4);
}

/* Rotating Colorful Border Beam */
.chat-input-beam-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 280deg,
        #ffaa40 310deg,
        #9c40ff 335deg,
        #00c6ff 360deg
    );
    animation: borderBeamRotate 4s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes borderBeamRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Inner Card */
.border-beam-card {
    position: relative;
    border-radius: 19px;
    background: #1d1d1d;
    box-shadow: inset 0 0 0 1px rgba(44, 47, 54, 0.52), inset 0 0 50px 0 rgba(255, 255, 255, 0.02);
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
    z-index: 2;
}

.chat-input-inner {
    padding: 7px 7px 8px;
    display: flex;
    flex-direction: column;
    min-height: 122px;
}

/* Chips Style */
.chat-chip {
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02), inset 0 1px 0 0 rgba(255, 255, 255, 0.04);
}

.chat-input-top-bar {
    display: flex;
    align-items: center;
}

.chat-at-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 24px;
    padding: 0 8px 0 6px;
    margin-left: 1px;
    font-size: 11px;
    color: #8B9099;
}

.chat-at-name {
    font-weight: 500;
}

.chat-text-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 13px;
    line-height: 18px;
    color: #e2e8f0;
    padding: 14px 4px 10px;
    font-family: inherit;
}

.chat-text-input::placeholder {
    color: #646b79;
}

.chat-input-bottom-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.chat-action-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 24px;
    padding: 0 6px 0 8px;
    font-size: 12px;
    line-height: 14px;
    color: #caccd2;
    cursor: default;
    user-select: none;
}

.chat-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    padding: 0;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.chat-arrow-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.chat-arrow-btn:active {
    transform: scale(0.95);
}

.chat-arrow-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.chatbot-branding {
    font-size: 0.65rem;
    color: #64748B;
    text-align: center;
    margin-top: 8px;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border: none;
    }
    .chatbot-launcher {
        bottom: 20px;
        right: 20px;
        width: 54px;
        height: 54px;
    }
}
