/*
 * Avisos en vivo del chat interno de RRHH (toasts flotantes).
 *
 * Se cargan desde el plugin 'RrhhChat' de AdminLTE y usan las variables de
 * Bootstrap, por lo que respetan el modo claro y el oscuro.
 */

.rrhh-chat-toasts {
    position: fixed;
    top: 4.5rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: .6rem;
    width: 350px;
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}

.rrhh-chat-toast {
    pointer-events: auto;
    display: flex;
    gap: .6rem;
    padding: .7rem .75rem;
    border-radius: .75rem;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    border: 1px solid var(--bs-border-color);
    border-left: 3px solid var(--bs-primary);
    box-shadow: 0 .6rem 1.8rem rgba(0, 0, 0, .25);
    animation: rrhh-chat-toast-in .18s ease-out;
}

.rrhh-chat-toast.is-leaving {
    animation: rrhh-chat-toast-out .16s ease-in forwards;
}

.rrhh-chat-toast-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

.rrhh-chat-toast-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-size: .8rem;
    font-weight: 600;
}

.rrhh-chat-toast .btn-close {
    width: .55rem;
    height: .55rem;
    padding: .35rem;
    margin: .1rem 0 0;
}

.rrhh-chat-toast-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@keyframes rrhh-chat-toast-in {
    from { opacity: 0; transform: translateX(1rem); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes rrhh-chat-toast-out {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(1rem); }
}

@media (max-width: 575.98px) {
    .rrhh-chat-toasts { top: auto; bottom: 1rem; right: .75rem; left: .75rem; width: auto; }
}
