/* --- AI ASSISTENT WRAPPER --- */
.ai-assistant-wrapper {
    position: absolute;
    top: 100px;
    right: 30px;
    width: 200px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: auto;
    cursor: grab;
}

.ai-assistant-wrapper:active {
    cursor: grabbing;
}

/* --- AI-GENERERT BILDE AVATAR --- */
.ai-character {
    width: 75px;
    height: 75px;
    /* PEK PÅ DITT EGET BILDE HER */
    background-image: url('../img/ai-avatar.gif'); 
    background-size: cover;
    background-position: center top;
    border-radius: 50%;
    margin-bottom: -15px;
    position: relative;
    border: 3px solid #d4af37;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    z-index: 2;
}

/* Glans-effekt over bildet for et mer eksklusivt preg */
.ai-character::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 50%);
    border-radius: 50%;
    pointer-events: none;
}

/* ANIMEERTE LEPPER SOM BEVEGER SEG OPPÅ BILDET */
.ai-character .mouth {
    position: absolute;
    width: 18px;
    height: 4px;
    background: #c0392b; /* Rød leppestift-farge */
    /* JUSTER DENNE (bottom) for å treffe nøyaktig der munnen på bildet ditt er */
    bottom: 18px; 
    left: 50%;
    transform: translateX(-50%);
    border-radius: 10px;
    z-index: 3;
    opacity: 0.9;
    display: none; /* Skjult helt til hun snakker/lytter */
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

/* Vis og animer munnen kun når JS legger til klassen 'speaking' */
.speaking .mouth {
    display: block;
    animation: aiTalkReal 0.25s infinite;
}

@keyframes aiTalkReal {
    0%, 100% { 
        height: 4px; 
        width: 18px; 
        border-radius: 10px;
    }
    50% { 
        height: 10px; 
        width: 14px; 
        border-radius: 50%; 
    }
}

/* --- DEN GULE POST-IT LAPPEN --- */
.ai-postit-note {
    background: #ffff88; /* Klassisk Post-it gul */
    padding: 25px 15px 12px 15px;
    border: 1px solid #e6e600;
    box-shadow: 5px 10px 25px rgba(0,0,0,0.4);
    transform: rotate(1deg); /* Litt skjev for håndskrevet følelse */
    width: 100%;
    box-sizing: border-box;
    border-radius: 3px;
}

#ai-bubble {
    font-family: 'Comic Sans MS', 'Marker Felt', cursive, sans-serif;
    font-size: 13px;
    color: #3d2b1f;
    margin-bottom: 10px;
    min-height: 50px;
    line-height: 1.4;
    text-align: center;
}

/* Input-rad med tekstfelt og mikrofon */
.ai-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    border-top: 1px dotted rgba(61, 43, 31, 0.3);
    padding-top: 8px;
    margin-top: 5px;
}

#ai-query {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 12px;
    color: #3d2b1f;
    font-family: inherit;
}

#ai-query::placeholder {
    color: rgba(61, 43, 31, 0.4);
}

/* Mikrofon-knappen */
.mic-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mic-btn:hover {
    transform: scale(1.3);
}

/* Skjul de gamle "øynene" siden de er på bildet nå */
.ai-character .eye {
    display: none;
}
