/* Ask Bob Floating Widget */
.ask-bob-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: none;
}

/* Widget Button - Small, subtle, bottom-right */
.ask-bob-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
}

.ask-bob-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4),
                0 0 20px rgba(16, 185, 129, 0.2);
}

.ask-bob-button:hover .bob-icon {
    animation: bobHover 1s ease-in-out infinite;
}

.ask-bob-button:active {
    transform: scale(0.95);
}

.ask-bob-button:active .bob-icon {
    animation: bobClick 0.4s cubic-bezier(0.36, 0, 0.66, -0.56);
    transform: scale(0.9);
}

.bob-icon {
    width: 40px;
    height: 40px;
    transition: transform 0.2s ease;
    position: relative;
    display: inline-block;
}

/* Bob's Body Parts Animations */
.bob-head {
    transform-origin: center;
    transition: transform 0.3s ease;
}

.bob-antenna {
    transform-origin: 50px 15px;
    transition: transform 0.3s ease;
}

.bob-antenna-ball {
    animation: antennaBlink 2s ease-in-out infinite;
}

@keyframes antennaBlink {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0.3; }
}

/* Bob's Eyes - Blinking Animation */
.bob-eye ellipse:first-child {
    animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {
    0%, 92%, 96%, 100% { ry: 5; }
    94%, 95% { ry: 0.5; }
}

/* Bob's Smile */
.bob-smile {
    transition: d 0.3s ease;
}

/* Bob's Arms - Hidden by default */
.bob-arm {
    opacity: 1;
    transform-origin: center;
    transition: all 0.3s ease;
}

/* Bob's Panel Animation */
.bob-panel-line {
    animation: panelPulse 2s ease-in-out infinite;
}

.bob-panel-line:nth-child(2) {
    animation-delay: 0.3s;
}

@keyframes panelPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.2; }
}

/* Hover State - Bob gets excited */
.ask-bob-button:hover .bob-head {
    animation: headWiggle 0.5s ease-in-out infinite;
}

.ask-bob-button:hover .bob-antenna {
    animation: antennaWave 0.8s ease-in-out infinite;
}

.ask-bob-button:hover .bob-smile {
    d: path("M 42 42 Q 50 49 58 42");
}

@keyframes headWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes antennaWave {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

/* Clicked State - Arms extend and point */
.ask-bob-widget.showing-help .ask-bob-button {
    transform: scale(1.15);
    box-shadow: 0 8px 35px rgba(16, 185, 129, 0.6),
                0 0 30px rgba(16, 185, 129, 0.4);
}

.ask-bob-widget.showing-help .bob-arm-left {
    transform: rotate(-45deg) translate(-8px, -8px);
}

.ask-bob-widget.showing-help .bob-arm-right {
    transform: rotate(45deg) translate(8px, -8px);
}

.ask-bob-widget.showing-help .bob-icon {
    animation: bobExcited 0.6s ease-in-out infinite;
}

.ask-bob-widget.showing-help .bob-smile {
    d: path("M 40 41 Q 50 50 60 41");
    stroke-width: 2.5;
}

.ask-bob-widget.showing-help .bob-eye ellipse:first-child {
    rx: 5;
    ry: 6;
}

/* Make help bubble prominent when clicked */
.ask-bob-widget.showing-help .bob-hover-bubble {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(-5px) scale(1.05) !important;
    pointer-events: auto !important;
    box-shadow: 0 12px 48px rgba(16, 185, 129, 0.3), 
                0 0 0 3px rgba(16, 185, 129, 0.2) !important;
    animation: helpBubblePulse 1.5s ease-in-out infinite;
}

@keyframes bobHover {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    15% { transform: translateY(-6px) rotate(-8deg) scale(1.08); }
    30% { transform: translateY(-8px) rotate(0deg) scale(1.08); }
    45% { transform: translateY(-6px) rotate(8deg) scale(1.08); }
    60% { transform: translateY(0) rotate(0deg) scale(1); }
}

@keyframes bobClick {
    0% { transform: scale(1) rotate(0deg); }
    30% { transform: scale(0.85) rotate(-12deg); }
    60% { transform: scale(1.1) rotate(12deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes bobExcited {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-4deg) translateY(-2px); }
    75% { transform: scale(1.05) rotate(4deg) translateY(-2px); }
}

@keyframes helpBubblePulse {
    0%, 100% { transform: translateY(-5px) scale(1.05); }
    50% { transform: translateY(-8px) scale(1.08); }
}

/* Bob Hover Speech Bubble */
.bob-hover-bubble {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(16, 185, 129, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 999;
}

.bob-hover-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 16px;
    height: 16px;
    background: #ffffff;
    transform: rotate(45deg);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.05);
}

.ask-bob-widget:not(.panel-open) .ask-bob-button:hover + .bob-hover-bubble,
.ask-bob-widget:not(.panel-open) .bob-hover-bubble:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.bob-hover-header {
    padding: 1rem 1rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bob-hover-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
    animation: bobPulse 2s infinite;
}

@keyframes bobPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.bob-hover-greeting {
    flex: 1;
}

.bob-hover-greeting h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

.bob-hover-greeting p {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.bob-hover-links {
    padding: 0.5rem 0.75rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bob-hover-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bob-hover-link:hover {
    background: #f1f5f9;
    border-color: #10b981;
    color: #059669;
    transform: translateX(4px);
}

.bob-hover-link i {
    width: 20px;
    text-align: center;
    color: #10b981;
    font-size: 0.9rem;
}

.bob-hover-link span {
    flex: 1;
}

.bob-hover-link .link-arrow {
    color: #94a3b8;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.bob-hover-link:hover .link-arrow {
    transform: translateX(3px);
    color: #10b981;
}

.bob-hover-cta {
    padding: 0 0.75rem 0.75rem;
}

.bob-hover-cta-btn {
    width: 100%;
    padding: 0.6rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.bob-hover-cta-btn:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

/* Chat Panel - Slide out from bottom */
.ask-bob-panel {
    position: absolute;
    bottom: 70px;
    left: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 100px);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.ask-bob-panel.open {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.ask-bob-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #0a0f1a 0%, #111827 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ask-bob-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ask-bob-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.ask-bob-avatar i {
    font-size: 1.2rem;
}

.ask-bob-info h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.ask-bob-info span {
    font-size: 0.75rem;
    color: #10b981;
}

.ask-bob-minimize {
    background: transparent;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.ask-bob-minimize:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Chat Area */
.ask-bob-chat {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ask-bob-message {
    display: flex;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ask-bob-message.user {
    flex-direction: row-reverse;
}

.ask-bob-message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ask-bob-message.user .ask-bob-message-avatar {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
}

.ask-bob-message.bot .ask-bob-message-avatar {
    background: #1f2937;
    color: #ffffff;
}

.ask-bob-message-avatar i {
    font-size: 0.9rem;
}

.ask-bob-message-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.ask-bob-message.user .ask-bob-message-bubble {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.ask-bob-message.bot .ask-bob-message-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.ask-bob-message-bubble p {
    margin: 0 0 0.5rem 0;
}

.ask-bob-message-bubble p:last-child {
    margin-bottom: 0;
}

.ask-bob-message-bubble code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Courier New', monospace;
}

.ask-bob-message-bubble pre {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.ask-bob-message-bubble pre code {
    background: none;
    padding: 0;
}

.ask-bob-message-bubble ul,
.ask-bob-message-bubble ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.ask-bob-message-bubble li {
    margin: 0.25rem 0;
}

.ask-bob-message-bubble strong {
    font-weight: 600;
    color: #1e293b;
}

.ask-bob-message.user .ask-bob-message-bubble strong {
    color: #ffffff;
}

.ask-bob-message-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.85em;
}

.ask-bob-message-bubble table th,
.ask-bob-message-bubble table td {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
}

.ask-bob-message-bubble table th {
    background: #f1f5f9;
    font-weight: 600;
}

.ask-bob-message-time {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.25rem;
    text-align: right;
}

.ask-bob-message.user .ask-bob-message-time {
    text-align: left;
}

/* Input Area */
.ask-bob-input-area {
    padding: 1rem;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.ask-bob-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.ask-bob-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    resize: none;
    max-height: 120px;
    font-family: inherit;
}

.ask-bob-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.ask-bob-send {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ask-bob-send:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ask-bob-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Suggestions */
.ask-bob-suggestions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.ask-bob-suggestion {
    padding: 0.5rem 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #475569;
}

.ask-bob-suggestion:hover {
    background: #e2e8f0;
    border-color: #10b981;
    color: #1e293b;
}

/* Welcome Message */
.ask-bob-welcome {
    text-align: center;
    padding: 2rem 1rem;
    color: #64748b;
}

.ask-bob-welcome-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #ffffff;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.ask-bob-welcome-icon i {
    font-size: 1.8rem;
}

.ask-bob-welcome h4 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.ask-bob-welcome p {
    margin: 0;
    font-size: 0.85rem;
}

/* Typing Indicator */
.ask-bob-typing {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.ask-bob-typing span {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ask-bob-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ask-bob-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Responsive - Mobile phones */
@media (max-width: 576px) {
    .ask-bob-panel {
        position: fixed !important;
        width: calc(100vw - 20px) !important;
        max-width: none !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 80px !important;
        height: calc(100vh - 100px) !important;
    }
    
    .bob-hover-bubble {
        position: fixed !important;
        width: calc(100vw - 20px) !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: 90px !important;
    }
    
    .bob-hover-bubble::after {
        right: 30px !important;
    }
}

/* Fade in animation for widget button */
@keyframes fadeInWidget {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ask-bob-widget.visible {
    display: block !important;
    animation: fadeInWidget 0.5s ease;
}

/* Footer Styles */
.footer-links a {
    transition: color 0.2s ease;
    font-weight: 500;
}

.footer-links a:hover {
    color: #3b82f6 !important;
}

footer {
    background-color: #ffffff;
}

