/* Asistente IA — módulo aislado (tema Vexa Mobius) */
.vm-asistente {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1080;
    font-family: inherit;
}

.vm-asistente__toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(0, 229, 214, 0.45);
    border-radius: 999px;
    background: linear-gradient(135deg, #111 0%, #1a1a1a 100%);
    color: #00e5d6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.vm-asistente__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 229, 214, 0.15);
}

.vm-asistente__clip {
    font-size: 1.25rem;
    line-height: 1;
}

.vm-asistente__toggle-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.vm-asistente__panel {
    position: absolute;
    right: 0;
    bottom: 56px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(520px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 229, 214, 0.35);
    border-radius: 12px;
    background: #141414;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.vm-asistente__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #0d0d0d;
    border-bottom: 1px solid rgba(0, 229, 214, 0.2);
    flex-shrink: 0;
}

.vm-asistente__title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #00e5d6;
    font-weight: 600;
    font-size: 0.9rem;
}

.vm-asistente__actions {
    display: flex;
    gap: 4px;
}

.vm-asistente__btn-icon {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #aaa;
    cursor: pointer;
}

.vm-asistente__btn-icon:hover {
    background: rgba(0, 229, 214, 0.12);
    color: #00e5d6;
}

.vm-asistente__messages {
    flex: 0 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    max-height: min(360px, calc(100vh - 260px));
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 214, 0.45) rgba(255, 255, 255, 0.05);
}

.vm-asistente__messages::-webkit-scrollbar {
    width: 6px;
}

.vm-asistente__messages::-webkit-scrollbar-track {
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.vm-asistente__messages::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 214, 0.35);
    border-radius: 999px;
}

.vm-asistente__messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 214, 0.6);
}

.vm-asistente__msg {
    display: flex;
    flex-shrink: 0;
}

.vm-asistente__msg--user {
    justify-content: flex-end;
}

.vm-asistente__msg--welcome {
    margin-bottom: 0;
}

.vm-asistente__bubble {
    max-width: 92%;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
}

.vm-asistente__bubble--rich {
    white-space: normal;
}

.vm-asistente__msg--assistant .vm-asistente__bubble {
    background: #1f1f1f;
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.vm-asistente__msg--welcome .vm-asistente__bubble {
    max-width: 100%;
    width: 100%;
    padding: 12px 14px;
    border-left: 3px solid #00e5d6;
    background: linear-gradient(135deg, #1a1a1a 0%, #1f1f1f 100%);
}

.vm-asistente__msg--user .vm-asistente__bubble {
    background: rgba(0, 229, 214, 0.15);
    color: #dffefa;
    border: 1px solid rgba(0, 229, 214, 0.35);
}

.vm-asistente__para {
    margin: 0 0 6px;
}

.vm-asistente__para:last-child {
    margin-bottom: 0;
}

.vm-asistente__para--lead {
    margin-bottom: 4px;
    color: #f0f0f0;
    font-weight: 600;
    font-size: 0.88rem;
}

.vm-asistente__para--hint {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.82rem;
    line-height: 1.5;
}

.vm-asistente__para--cta {
    margin-bottom: 0;
    color: #00e5d6;
    font-weight: 600;
    font-size: 0.84rem;
}

.vm-asistente__list {
    margin: 6px 0 8px;
    padding: 0;
    list-style: none;
}

.vm-asistente__list--numbered {
    counter-reset: vm-asistente-ol;
}

.vm-asistente__list-item {
    position: relative;
    margin-bottom: 10px;
    padding: 8px 10px 8px 22px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
    line-height: 1.5;
}

.vm-asistente__list-item:last-child {
    margin-bottom: 0;
}

.vm-asistente__list:not(.vm-asistente__list--numbered) > .vm-asistente__list-item::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 14px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e5d6;
}

.vm-asistente__list--numbered > .vm-asistente__list-item {
    counter-increment: vm-asistente-ol;
    padding-left: 28px;
}

.vm-asistente__list--numbered > .vm-asistente__list-item::before {
    content: counter(vm-asistente-ol) '.';
    position: absolute;
    left: 8px;
    top: 8px;
    color: #00e5d6;
    font-weight: 700;
    font-size: 0.75rem;
}

.vm-asistente__bubble strong {
    color: #dffefa;
    font-weight: 600;
}

.vm-asistente__bubble em {
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

.vm-asistente__code {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0, 229, 214, 0.12);
    color: #00e5d6;
    font-size: 0.78rem;
    font-family: Consolas, Monaco, monospace;
}

.vm-asistente__link {
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(0, 229, 214, 0.15);
    border: 1px solid rgba(0, 229, 214, 0.35);
    color: #00e5d6 !important;
    text-decoration: none !important;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.15s ease;
}

.vm-asistente__link:hover {
    background: rgba(0, 229, 214, 0.28);
    color: #fff !important;
}

.vm-asistente__link--muted {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(0, 229, 214, 0.9) !important;
    font-weight: 500;
}

.vm-asistente__form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: #101010;
    flex-shrink: 0;
}

.vm-asistente__input {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 96px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #1a1a1a;
    color: #eee;
    padding: 8px 10px;
    font-size: 0.85rem;
    line-height: 1.4;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.vm-asistente__input:focus {
    outline: none;
    border-color: rgba(0, 229, 214, 0.45);
    box-shadow: 0 0 0 2px rgba(0, 229, 214, 0.1);
}

.vm-asistente__input:-webkit-autofill,
.vm-asistente__input:-webkit-autofill:hover,
.vm-asistente__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1a1a1a inset !important;
    -webkit-text-fill-color: #eee !important;
    caret-color: #eee;
    transition: background-color 9999s ease-out 0s;
}

.vm-asistente__send {
    width: 40px;
    height: 42px;
    border: none;
    border-radius: 8px;
    background: #00e5d6;
    color: #111;
    cursor: pointer;
    flex-shrink: 0;
}

.vm-asistente__send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.vm-asistente__status {
    padding: 0 12px 8px;
    font-size: 0.75rem;
    color: #888;
    min-height: 18px;
    flex-shrink: 0;
}

.vm-asistente.is-open .vm-asistente__toggle {
    border-color: #00e5d6;
}

.vm-asistente.is-loading .vm-asistente__send {
    opacity: 0.6;
}

@media (max-width: 480px) {
    .vm-asistente {
        right: 12px;
        bottom: 12px;
    }

    .vm-asistente__toggle-label {
        display: none;
    }

    .vm-asistente__panel {
        width: calc(100vw - 24px);
    }
}
