.asistente-fab {
    position: fixed;
    right: 24px;
    bottom: 96px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #0B2545;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 1050;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.asistente-fab:hover {
    transform: scale(1.06);
}

.asistente-fab .bi-x-lg {
    display: none;
}

.asistente-fab.is-open .bi-chat-dots-fill {
    display: none;
}

.asistente-fab.is-open .bi-x-lg {
    display: inline-block;
}

.asistente-panel {
    position: fixed;
    right: 24px;
    bottom: 164px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: calc(100vh - 210px);
    background: #071A33;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
    z-index: 1050;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.asistente-panel.is-open {
    display: flex;
}

.asistente-panel__header {
    background: #0B2545;
    color: #fff;
    padding: 14px 16px;
    flex-shrink: 0;
}

.asistente-panel__header strong {
    display: block;
    font-size: 0.95rem;
}

.asistente-panel__header span {
    font-size: 0.75rem;
    opacity: 0.9;
}

.asistente-panel__body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.asistente-msg {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.asistente-msg--bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    color: #eef1ff;
    border-bottom-left-radius: 2px;
}

.asistente-msg--user {
    align-self: flex-end;
    background: #1558AD;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.asistente-msg--error {
    align-self: flex-start;
    background: rgba(255, 99, 99, 0.15);
    color: #ffb3b3;
    border-bottom-left-radius: 2px;
}

.asistente-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 2px;
}

.asistente-chip {
    background: rgba(140, 192, 255, 0.14);
    border: 1px solid rgba(140, 192, 255, 0.5);
    color: #CFE4FF;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.15s ease;
}

.asistente-chip:hover {
    background: rgba(140, 192, 255, 0.26);
}

.asistente-consent {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.asistente-consent p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #d7dcf5;
}

.asistente-consent__link {
    font-size: 0.75rem;
    color: #8CC0FF;
    text-decoration: underline;
    width: fit-content;
}

.asistente-consent__botones {
    display: flex;
    gap: 8px;
}

.asistente-consent__btn {
    flex: 1 1 auto;
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}

.asistente-consent__btn--aceptar {
    background: #8CC0FF;
    color: #071A33;
}

.asistente-consent__btn--rechazar {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #d7dcf5;
}

.asistente-panel__footer {
    flex-shrink: 0;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 8px;
}

.asistente-panel__input {
    flex: 1 1 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    resize: none;
}

.asistente-panel__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.asistente-panel__send {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #8CC0FF;
    color: #071A33;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asistente-panel__send:disabled {
    opacity: 0.6;
}

@media (max-width: 480px) {
    .asistente-panel {
        right: 16px;
        left: 16px;
        width: auto;
        bottom: 150px;
    }

    .asistente-fab {
        right: 16px;
        bottom: 84px;
    }
}

.asistente-msg__link {
    color: #8CC0FF;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.asistente-msg__link:hover {
    color: #fff;
}

.asistente-msg--aviso {
    align-self: center;
    background: rgba(74, 222, 128, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.4);
    color: #BBF7D0;
    font-size: 0.8rem;
    text-align: center;
}
