/* Floating Agent Guide - Premium Aesthetics */

:root {
    --guide-primary: #e6841a;
    --guide-secondary: #f09235;
    --guide-bg: rgba(25, 25, 25, 0.85);
    --guide-glass: blur(16px);
    --guide-text: #ffffff;
    --guide-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Bubble */
.theia-guide-bubble {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--guide-primary), var(--guide-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--guide-shadow);
    z-index: 10000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: bubblePulse 2s infinite;
}

.theia-guide-bubble:hover {
    transform: scale(1.1) rotate(5deg);
}

.theia-guide-bubble svg {
    width: 30px;
    height: 30px;
    fill: white;
}

@keyframes bubblePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 132, 26, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(230, 132, 26, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(230, 132, 26, 0);
    }
}

/* Container */
.theia-guide-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: var(--guide-bg);
    backdrop-filter: var(--guide-glass);
    -webkit-backdrop-filter: var(--guide-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--guide-shadow);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.theia-guide-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.theia-guide-header {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.theia-guide-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theia-guide-header-avatar {
    width: 40px;
    height: 40px;
    background: var(--guide-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.theia-guide-header-title h3 {
    margin: 0;
    font-size: 16px;
    color: white;
    font-weight: 600;
}

.theia-guide-header-title p {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.theia-guide-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.theia-guide-close:hover {
    opacity: 1;
}

/* Messages */
.theia-guide-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    animation: msgIn 0.3s ease-out;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-user {
    align-self: flex-end;
    background: var(--guide-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.message-isa {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

/* Input Area */
.theia-guide-input-container {
    padding: 20px;
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.theia-guide-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 15px;
    color: white;
    outline: none;
    transition: border-color 0.2s;
}

.theia-guide-input:focus {
    border-color: var(--guide-primary);
}

.theia-guide-send {
    background: var(--guide-primary);
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.theia-guide-send:disabled {
    background: rgba(255, 255, 255, 0.1);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    width: fit-content;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: dotPulse 1.5s infinite;
}

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

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

@keyframes dotPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 480px) {
    .theia-guide-container {
        width: calc(100% - 40px);
        height: 80vh;
        right: 20px;
        bottom: 90px;
    }
}