.dandelion-orb {
    position: fixed;
    left: 0;
    top: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: transparent;
    overflow: visible;
    pointer-events: auto;
    cursor: pointer;
    z-index: 9999;
    transform: translate3d(0, 0, 0);
    transform-origin: center center;
}

.dandelion-orb:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 6px;
}

.dandelion-orb #orb,
.dandelion-orb canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.dandelion-orb-question {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 600;
    color: #7fd8ff;
    text-shadow: 0 0 10px rgba(127, 216, 255, 0.9);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.dandelion-orb-question.is-visible {
    opacity: 1;
}

@media (max-width: 768px) {
    .dandelion-orb {
        left: 30px;
        width: 100px;
        height: 100px;
    }
}

/* Chat panel */
.dandelion-chat-wrapper {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 320px;
    max-width: calc(100vw - 2rem);
    max-height: 420px;
    z-index: 9998;
    pointer-events: none;
}

.dandelion-chat-wrapper.is-open {
    pointer-events: auto;
}

.dandelion-chat-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 380px;
    padding: 0;
    background: rgba(15, 28, 48, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(120, 160, 220, 0.15);
    border-radius: 1rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 4px 24px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

.dandelion-chat-panel::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(80, 130, 200, 0.06) 0%, transparent 100%);
    pointer-events: none;
}

.dandelion-chat-wrapper.is-open .dandelion-chat-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.dandelion-chat-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(120, 160, 220, 0.15);
    flex-shrink: 0;
}

.dandelion-chat-title {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.dandelion-chat-thinking {
    margin-left: auto;
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dandelion-chat-thinking.is-visible {
    opacity: 1;
}

.dandelion-chat-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 192, 163, 0.2);
    color: #00c0a3;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.dandelion-chat-close:hover {
    background: rgba(0, 192, 163, 0.4);
}

.dandelion-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
}

.dandelion-chat-prompts {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 4px;
}

.dandelion-chat-prompts.is-hidden {
    display: none;
}

.dandelion-chat-prompt {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(120, 160, 220, 0.2);
    background: rgba(0, 192, 163, 0.08);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.dandelion-chat-prompt:hover {
    background: rgba(0, 192, 163, 0.18);
    border-color: rgba(120, 160, 220, 0.35);
}

.dandelion-chat-bubble {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.45;
    word-wrap: break-word;
}

.dandelion-chat-bubble.user {
    align-self: flex-end;
    background: rgba(0, 192, 163, 0.25);
    color: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(120, 160, 220, 0.15);
}

.dandelion-chat-bubble.assistant {
    align-self: flex-start;
    background: #0a1422;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(120, 160, 220, 0.15);
}

.dandelion-chat-bubble.assistant a {
    color: #00c0a3;
    text-decoration: underline;
}

.dandelion-chat-bubble.assistant a:hover {
    color: #00e6c4;
}

.dandelion-chat-bubble.error {
    align-self: flex-start;
    background: rgba(200, 80, 80, 0.2);
    color: rgba(255, 200, 200, 0.95);
    border: 1px solid rgba(255, 100, 100, 0.3);
}

.dandelion-chat-loading {
    align-self: flex-start;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dandelion-chat-loading span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00c0a3;
    animation: chatBounce 0.6s ease-in-out infinite alternate;
}

.dandelion-chat-loading span:nth-child(2) {
    animation-delay: 0.15s;
}

.dandelion-chat-loading span:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes chatBounce {
    from {
        transform: translateY(0);
        opacity: 0.5;
    }
    to {
        transform: translateY(-4px);
        opacity: 1;
    }
}

.dandelion-chat-input-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid rgba(120, 160, 220, 0.15);
    flex-shrink: 0;
}

.dandelion-chat-input-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(120, 160, 220, 0.15);
    border-radius: 10px;
    background: rgba(0, 192, 163, 0.06);
    color: #fff;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s;
}

.dandelion-chat-input-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.dandelion-chat-input-form input:focus {
    border-color: #00c0a3;
}

.dandelion-chat-send {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    background: #ffb939;
    color: #071a1f;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dandelion-chat-send:hover:not(:disabled) {
    background: #ffc55c;
}

.dandelion-chat-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .dandelion-chat-wrapper {
        bottom: 2.5rem;
        right: 2.5rem;
        left: 1rem;
        width: auto;
        max-height: 70vh;
    }

    .dandelion-chat-panel {
        height: 340px;
        max-height: 70vh;
    }
}

