/* Raiz */
.tutor-ia-root {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
    --tutor-ia-width: 380px;
    --tutor-ia-color: #ff9900;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Bolha */
.tutor-ia-bubble {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--tutor-ia-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    transition: transform .18s ease, box-shadow .18s ease;
}

.tutor-ia-bubble img {
    width: 38px;
    height: 38px;
}

.tutor-ia-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Janela */
.tutor-ia-window {
    position: absolute;
    right: 0;
    bottom: 80px;
    width: var(--tutor-ia-width);
    max-height: 520px;
    background: #050505;
    border-radius: 18px;
    box-shadow: 0 16px 45px rgba(0, 0, 0, 0.65);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 153, 0, 0.45);
}

/* Cabeçalho */
.tutor-ia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: radial-gradient(circle at top left, #ffb347 0, #ff9900 30%, #111 75%);
    color: #fff;
}

.tutor-ia-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tutor-ia-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 0 12px rgba(0, 0, 0, .6);
}

.tutor-ia-title-wrap strong {
    font-size: 14px;
}

.tutor-ia-title-wrap small {
    font-size: 12px;
    opacity: .9;
}

.tutor-ia-minimize {
    background: rgba(0, 0, 0, .25);
    border: 1px solid rgba(255, 255, 255, .45);
    color: #fff;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

/* Mensagens */
.tutor-ia-messages {
    padding: 14px;
    background: #050505;
    color: #f5f5f5;
    font-size: 14px;
    line-height: 1.5;
    overflow-y: auto;
    max-height: 340px;
}

.tutor-ia-msg {
    padding: 9px 11px;
    border-radius: 12px;
    margin-bottom: 8px;
    max-width: 80%;
    word-wrap: break-word;
}

.tutor-ia-msg.user {
    margin-left: auto;
    background: var(--tutor-ia-color);
    color: #fff;
}

.tutor-ia-msg.bot {
    margin-right: auto;
    background: #151515;
    border: 1px solid rgba(255, 255, 255, .06);
}

/* Input */
.tutor-ia-input-wrap {
    padding: 10px;
    background: #050505;
    border-top: 1px solid #222;
    display: flex;
    gap: 8px;
}

.tutor-ia-input {
    flex: 1;
    min-height: 46px;
    max-height: 100px;
    resize: none;
    border-radius: 12px;
    border: 1px solid #333;
    background: #0a0a0a;
    color: #fff;
    padding: 8px 10px;
    font-size: 13px;
}

.tutor-ia-input:focus {
    outline: none;
    border-color: var(--tutor-ia-color);
    box-shadow: 0 0 0 1px rgba(255, 153, 0, 0.35);
}

.tutor-ia-send {
    border-radius: 999px;
    padding: 0 18px;
    border: none;
    background: var(--tutor-ia-color);
    color: #000;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

/* Responsivo */
@media (max-width: 600px) {
    .tutor-ia-root {
        right: 16px;
        bottom: 16px;
    }
    .tutor-ia-window {
        width: 92vw;
        right: -4px;
    }
}
