/* =========================================
   1. FUNDAL ȘI WIDGET CONTAINER
   ========================================= */

#chat-widget {
    position: fixed;
    bottom: 1px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-sizing: border-box;
}

/* GLASSMORPHISM FEREASTRA CHATBOT */
#chat-trigger {
    width: 95vw;
    max-width: 350px;
    padding: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.chatbot-text {
    font-weight: bold;
    color: red;
    font-size: 1.2rem;
    text-shadow: black .8px .8px .8px;
    margin-bottom: 12px;
}

/* =========================================
   2. CHATBOT
   ========================================= */

/* CONTAINER CHATBOT */
.robot-image-container {
    margin: 8px auto;
    width: 53px;
    height: 53px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    /* PLUTIRE IMAGINE */
    animation: floating-anim 3s infinite alternate ease-in-out;
}

.floating-robot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 1.7px solid cyan;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

/* ANIMATIE PLUTIRE SI ROTATIE */
@keyframes floating-anim {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-10px);
    }
}

/* =========================================
   3. FEREASTRA DE CHAT ȘI DISPLAY
   ========================================= */

#chat-window {
    display: none;
    width: 95vw;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2);
}

#display {
    text-align: center;
    background-color: #f9f9f9;
    border-radius: 12px;
    height: 431px;
    overflow-y: auto;
    padding: 15px;
    margin-bottom: 5px;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.minimize-btn {
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    color: #003388;
    padding: 5px 0;
    text-align: center;
}

/* =========================================
   4. TIMING BAR (DISCRETĂ)
   ========================================= */
#timeout-bar-container {
    width: 100%;
    height: 1.7px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

#timeout-bar {
    width: 100%;
    height: 100%;
    background: cyan !important;
    border-radius: 10px;
}

/* =========================================
   5. ANIMAȚII GÂNDIRE
   ========================================= */

.typing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
}

.robot-thinking {
    font-size: 2.5rem;
    animation: hoverRobot 1.2s infinite ease-in-out;
}

.typing-loader {
    display: flex;
    gap: 6px;
}

.typing-loader span {
    width: 10px;
    height: 10px;
    background-color: dodgerblue;
    border-radius: 50%;
    animation: wave 1.3s infinite ease-in-out;
}

.typing-loader span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-loader span:nth-child(3) {
    animation-delay: 0.4s;
}

/* =========================================
   6. MESAJE ȘI BUTOANE (UI)
   ========================================= */

.bot-msg {
    color: red;
    font-size: 1.1rem;
    line-height: 1.4;
    text-shadow: black .8px .8px .8px;
    animation: fadeInMsg 0.4s ease-out;
}

.quiz-option {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    background: #003366;
    border: none;
    border-radius: 10px;
    color: cyan;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quiz-option:hover {
    background: #00ff7f;
    color: #003366;
    transform: scale(1.03);
}

.animated-text {
    font-weight: bold;
    color: #d9534f;
    font-size: 1.1rem;
}

/* =========================================
   7. KEYFRAMES
   ========================================= */

@keyframes move-head {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(-3deg);
    }

    100% {
        transform: translateY(0) rotate(3deg);
    }
}

@keyframes wave {

    0%,
    60%,
    100% {
        transform: translateY(0);
    }

    30% {
        transform: translateY(-8px);
    }
}

@keyframes hoverRobot {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}