.form-control:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15) !important;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.burn-countdown {
    font-size: 0.75rem;
    font-family: monospace;
}

.animate-burn-out {
    animation: burnOut 0.5s ease-in forwards;
}

@keyframes burnOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(0.9);
        height: 0;
        margin-bottom: 0 !important;
        padding: 0 !important;
    }
}

.animate-pulse {
    animation: pulse 1s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.2);
    }
}

.blob {
    background: #dc3545;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 1);
    margin: 4px;
    height: 10px;
    width: 10px;
    transform: scale(1);
    animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.mic-recording {
    color: #dc3545 !important;
    animation: pulse 0.6s infinite alternate;
}

/* =====================================================
   REACTION SYSTEM
   ===================================================== */

/* The wrapper no longer needs 36px padding because buttons are inline flex items */
.chat-message-wrapper {
    padding-left: 4px;
    padding-right: 4px;
}

/* The floating reaction trigger button */
.reaction-trigger {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    padding: 0;
}

/* Show on wrapper hover */
.chat-message-wrapper:hover .reaction-trigger {
    opacity: 1;
    transform: scale(1.08);
}

/* Sent messages: button on the left of the bubble */
.chat-message-wrapper.align-items-end .reaction-trigger {
    left: 4px;
}

/* Received messages: button on the right of the bubble */
.chat-message-wrapper.align-items-start .reaction-trigger {
    right: 4px;
}

/* The popover strip of quick emojis */
.reaction-popover-strip {
    display: none;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 4px 8px;
    gap: 4px;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    z-index: 20;
    white-space: nowrap;
    animation: fadeIn 0.15s ease-out;
    margin-top: 4px;
    /* Align to right for sent, left for received (controlled by parent flex alignment) */
    align-self: flex-end;
}

.chat-message-wrapper.align-items-start .reaction-popover-strip {
    align-self: flex-start;
}

.reaction-popover-strip.visible {
    display: flex;
}

/* Remove old absolute positioning overrides */
.chat-message-wrapper.align-items-end .reaction-popover-strip,
.chat-message-wrapper.align-items-start .reaction-popover-strip {
    position: static;
    left: auto;
    right: auto;
}

.reaction-popover-strip button {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s ease, background 0.1s ease;
    padding: 0;
}

.reaction-popover-strip button:hover {
    transform: scale(1.3);
    background: #f8f9fa;
}

/* Reaction badges below the bubble */
.reactions-display {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.reactions-display .reaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    cursor: default;
    animation: fadeIn 0.2s ease-out;
}

.reactions-display .reaction-badge .reaction-count {
    font-size: 0.7rem;
    font-weight: 700;
    color: #555;
}

/* =====================================================
   SIDEBAR HOVER DETAILS & DM ACTIONS
   ===================================================== */
.hover-bg-light {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.hover-bg-light:hover {
    background-color: rgba(220, 53, 69, 0.06) !important;
}

.btn-open-dm {
    transition: all 0.2s ease !important;
}

.btn-open-dm:hover {
    background-color: #dc3545 !important;
    color: white !important;
    transform: scale(1.15);
}

/* =====================================================
   CHAT TABS HORIZONTAL SCROLLING
   ===================================================== */
#chat-tabs-headers {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
    /* Firefox */
}

/* For Webkit browsers (Chrome, Safari, Edge) */
#chat-tabs-headers::-webkit-scrollbar {
    height: 4px;
}

#chat-tabs-headers::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

#chat-tabs-headers::-webkit-scrollbar-track {
    background: transparent;
}

#chat-tabs-headers .nav-item {
    flex-shrink: 0 !important;
}

/* =====================================================
   PREMIUM CHAT COLOR SELECTION OPTIONS
   ===================================================== */
.chat-color-option {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    cursor: pointer;
}

.chat-color-option:hover {
    transform: scale(1.22);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15) !important;
    border-color: rgba(0, 0, 0, 0.25) !important;
}

.chat-color-option:active {
    transform: scale(0.95);
}

/* 1. ESTILOS POR DEFECTO (Escritorio o mayor a 768px) */
#chat-sidebar-offcanvas.sidebar-chat {
    /* Aquí pones lo que quieras que pase en escritorio */
    width: 300px;
    /* O lo que mida tu sidebar normal */
    position: relative;
    /* O absolute, según tu diseño */
}

/* 2. MEDIA QUERY PARA MÓVIL */
@media (max-width: 767.98px) {
    #chat-sidebar-offcanvas.sidebar-chat {
        position: relative !important;
        transform: none !important;
        visibility: visible !important;

        /* USAR PORCENTAJE EN LUGAR DE PX FIJOS PARA EVITAR QUE SE DESBORDE */
        width: 35%;
        min-width: 60px;
        /* Mínimo para que no se rompa */
        max-width: 240px;

        height: 100% !important;
        border-left: 1px solid var(--bs-border-color) !important;
        padding: 0.5rem 0.35rem !important;
        z-index: 10 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    /* Make sure main chat tab panes resize dynamically */
    #chat-tabs-contents {
        width: calc(100% - 110px) !important;
        flex-grow: 1 !important;
    }

    /* Smaller chat tab on mobile */
    #chat-tabs-headers .nav-link {
        font-size: 0.72rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    /* Force full-width chat container on mobile */
    .site-index.container-xl {
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    #chat-container {
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    /* Hide elements inside sidebar on mobile */
    #chat-sidebar-offcanvas.sidebar-chat .offcanvas-header,
    #chat-sidebar-offcanvas.sidebar-chat .mb-4,
    /* Sala Activa selector */
    #chat-sidebar-offcanvas.sidebar-chat .mb-2,
    /* Active users header */
    #chat-sidebar-offcanvas.sidebar-chat p.text-muted,
    /* Instructions description */
    #chat-sidebar-offcanvas.sidebar-chat .mb-3.position-relative

    /* Search input container */
        {
        display: none !important;
    }

    /* Hide the card text details in my-profile-card, show only avatar */
    #my-profile-card {
        padding: 0.25rem !important;
        margin-bottom: 0.75rem !important;
        border: none !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    #my-profile-card .card-body {
        padding: 0 !important;
        justify-content: center !important;
    }

    #my-profile-card .card-body>div:not(#my-avatar-container) {
        display: none !important;
    }

    /* Participant list: horizontal layout on mobile (avatar left, name right) */
    #participants-list {
        border: none !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 4px !important;
    }

    #participants-list>.w-100 {
        width: 100% !important;
        padding: 0 !important;
    }

    /* ROW layout: avatar a la izquierda, nombre a la derecha */
    #participants-list>.w-100>.d-flex {
        padding: 0.3rem 0.4rem !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        background: transparent !important;
        border: none !important;
        width: 100% !important;
        text-align: left !important;
    }

    /* Avatar pequeño a la izquierda */
    #participants-list>.w-100>.d-flex .rounded-circle {
        width: 25px !important;
        height: 25px !important;
        min-width: 25px !important;
        min-height: 25px !important;
        max-width: 25px !important;
        max-height: 25px !important;
        margin-right: 0 !important;
        margin-bottom: 0 !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        object-fit: cover !important;
        font-size: 0.62rem !important;
    }

    /* DM profile avatar is smaller on mobile */
    #dm-profile-avatar-wrapper .rounded-circle {
        width: 70px !important;
        height: 70px !important;
        font-size: 1.8rem !important;
        line-height: 70px !important;
    }

    /* Contenedor de texto: ocupa el espacio restante */
    #participants-list>.w-100>.d-flex>.overflow-hidden {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }

    /* Ocultar detalles secundarios (subtítulo, badge @, género) */
    #participants-list>.w-100>.d-flex .btn-mention-participant,
    #participants-list>.w-100>.d-flex .gender-badge,
    #participants-list>.w-100>.d-flex .text-muted {
        display: none !important;
    }

    /* Nombre del participante: truncado en una línea, a la derecha del avatar */
    #participants-list span.text-truncate {
        display: block !important;
        max-width: 100% !important;
        font-size: 0.68rem !important;
        font-weight: 700 !important;
        text-align: left !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        color: inherit !important;
        line-height: 1.2 !important;
    }

    /* Constrain chat wrappers and bubbles on mobile to prevent overflow/overlap under the right sidebar */
    .chat-message-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }

    .chat-message-wrapper.align-items-end {
        padding-right: 8px !important;
        padding-left: 8px !important;
    }

    .chat-message-wrapper.align-items-start {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .bubble-row {
        width: 100% !important;
        max-width: 100% !important;
        flex-wrap: wrap !important;
    }

    .chat-message-wrapper.align-items-end .bubble-row {
        justify-content: flex-end !important;
    }

    .chat-message-wrapper.align-items-start .bubble-row {
        justify-content: flex-start !important;
    }

    .message-bubble {
        width: 100% !important;
        max-width: 100% !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        order: 1 !important;
    }

    /* Force all types of message bubbles (sent and received) to respect bounds */
    .chat-message-wrapper.align-items-end .message-bubble,
    .chat-message-wrapper.align-items-start .message-bubble {
        width: 100% !important;
        max-width: 100% !important;
        order: 1 !important;
    }

    /* Triggers go below the bubble on mobile */
    .reaction-trigger,
    .reply-trigger,
    .block-trigger-direct {
        order: 2 !important;
        margin-top: 4px !important;
    }

    /* Constrain inline GIFs on mobile */
    .gif-message-inline {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Ensure media player and other inner blocks inside bubble fit perfectly */
    .message-bubble audio {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .message-bubble>div {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Hide invite friend button on header and standard offcanvas toggles on mobile */
    button[data-bs-toggle="offcanvas"][data-bs-target="#chat-sidebar-offcanvas"] {
        display: none !important;
    }

    /* Hide country flag icons on mobile */
    .participant-flag {
        display: none !important;
    }
}

/* Avatar pequeño a la izquierda */
#participants-list>.w-100>.d-flex .rounded-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
}

/* =====================================================
   SIDEBAR RESIZE HANDLE
   ===================================================== */
#sidebar-resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    background: transparent;
    z-index: 30;
    transition: background 0.2s ease;
    touch-action: none;
}

#sidebar-resize-handle::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    border-radius: 2px;
    background: var(--bs-border-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

#sidebar-resize-handle:hover::after,
#sidebar-resize-handle.dragging::after {
    opacity: 1;
}

#sidebar-resize-handle:hover,
#sidebar-resize-handle.dragging {
    background: rgba(220, 53, 69, 0.08);
}

/* Style for inactive tabs */
.nav-link.tab-inactive {
    color: #6c757d !important;
    opacity: 0.65;
}

/* =====================================================
   ELEGANT GENDER SELECTOR ON LANDING PAGE
   ===================================================== */
.gender-selector-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.gender-select-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.gender-select-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.gender-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    margin-bottom: 8px;
    font-size: 1.2rem;
    transition: all 0.25s ease;
    background-color: #f8f9fa;
    color: #6c757d;
}

.gender-label-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    transition: color 0.25s ease;
}

/* Active/Checked States via sibling combinator (+) */
#gender-neutral:checked+.gender-select-card {
    border-color: rgba(16, 185, 129, 0.4);
    background-color: rgba(16, 185, 129, 0.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}

#gender-neutral:checked+.gender-select-card .gender-icon-wrapper {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    transform: scale(1.1);
}

#gender-neutral:checked+.gender-select-card .gender-label-text {
    color: #10b981;
}

#gender-male:checked+.gender-select-card {
    border-color: rgba(59, 130, 246, 0.4);
    background-color: rgba(59, 130, 246, 0.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.08);
}

#gender-male:checked+.gender-select-card .gender-icon-wrapper {
    background-color: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    transform: scale(1.1);
}

#gender-male:checked+.gender-select-card .gender-label-text {
    color: #3b82f6;
}

#gender-female:checked+.gender-select-card {
    border-color: rgba(244, 63, 94, 0.4);
    background-color: rgba(244, 63, 94, 0.05);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.08);
}

#gender-female:checked+.gender-select-card .gender-icon-wrapper {
    background-color: rgba(244, 63, 94, 0.15);
    color: #f43f5e;
    transform: scale(1.1);
}

#gender-female:checked+.gender-select-card .gender-label-text {
    color: #f43f5e;
}

/* =====================================================
   ELEGANT GENDER INDICATOR IN CHAT (OUTLINES & BADGES)
   ===================================================== */
.gender-outline-male {
    border: 2px solid #3b82f6 !important;
    padding: 1px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-outline-male-lg {
    border: 3px solid #3b82f6 !important;
    padding: 2px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-outline-female {
    border: 2px solid #f43f5e !important;
    padding: 1px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-outline-female-lg {
    border: 3px solid #f43f5e !important;
    padding: 2px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-outline-neutral {
    border: 2px solid #10b981 !important;
    padding: 1px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-outline-neutral-lg {
    border: 3px solid #10b981 !important;
    padding: 2px;
    background-color: var(--bs-body-bg, #fff);
}

.gender-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.75rem;
    vertical-align: middle;
    line-height: 1;
    transition: all 0.2s ease;
}

.gender-badge-male {
    background-color: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.gender-badge-female {
    background-color: rgba(244, 63, 94, 0.12);
    color: #db2777;
    border: 1px solid rgba(244, 63, 94, 0.25);
}

.gender-badge-neutral {
    background-color: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* =====================================================
   USER MENTIONS & NOTIFICATIONS
   ===================================================== */
.mention-pill {
    background-color: rgba(108, 117, 125, 0.12);
    color: #495057;
    border: 1px solid rgba(108, 117, 125, 0.25);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
    font-weight: 600;
    display: inline-block;
    vertical-align: middle;
}

.mention-pill-me {
    background-color: rgba(255, 193, 7, 0.18);
    color: #b58105;
    border: 1px solid rgba(255, 193, 7, 0.45);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.85em;
    font-weight: 700;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(255, 193, 7, 0.12);
}

.message-mention-highlight .message-bubble {
    border-left: 4px solid #ffc107 !important;
    background-color: rgba(255, 193, 7, 0.05) !important;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.08) !important;
}

/* =====================================================
   MESSAGE REPLY SYSTEM (THREADING/QUOTING)
   ===================================================== */

/* Floating reply button beside the bubble, next to reaction button */
.reply-trigger {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dee2e6;
    background: #fff;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    padding: 0;
}

.chat-message-wrapper:hover .reply-trigger {
    opacity: 1;
    transform: scale(1.08);
}

.reply-trigger i {
    color: #6c757d;
}

.reply-trigger:hover i {
    color: #dc3545;
}

/* Align buttons nicely in bubble-row */
.bubble-row {
    max-width: 95%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
}

.message-bubble {
    flex-shrink: 1 !important;
}

.bubble-row .reaction-trigger,
.bubble-row .reply-trigger {
    margin: 0 2px;
}

/* Reply Preview Bar above Input */
#reply-preview-container {
    border-left: 4px solid #dc3545 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* Quoted message container inside bubble */
.quoted-message-box {
    border-left: 3px solid #6c757d;
    background-color: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
    padding: 6px 10px;
    margin-bottom: 6px;
    transition: background-color 0.2s ease;
}

.quoted-message-box:hover {
    background-color: rgba(0, 0, 0, 0.07);
}

/* Sent quoted message box (on red bubble) */
.chat-message-wrapper.align-items-end .quoted-message-box {
    border-left-color: rgba(255, 255, 255, 0.7);
    background-color: rgba(255, 255, 255, 0.15);
}

.chat-message-wrapper.align-items-end .quoted-message-box:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

.chat-message-wrapper.align-items-end .quoted-message-box .text-secondary {
    color: rgba(255, 255, 255, 0.8) !important;
}

.chat-message-wrapper.align-items-end .quoted-message-box .text-danger {
    color: rgba(255, 255, 255, 0.95) !important;
}

/* Flash animation for navigated quotes */
.flash-highlight .message-bubble {
    animation: flashHighlightAnimation 2s ease;
}

@keyframes flashHighlightAnimation {
    0% {
        background-color: rgba(255, 193, 7, 0.4) !important;
        box-shadow: 0 0 12px rgba(255, 193, 7, 0.4);
    }

    100% {
        /* returns to original */
    }
}

/* Participant list mention button */
.btn-mention-participant {
    cursor: pointer;
    background-color: rgba(108, 117, 125, 0.08);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.15);
    border-radius: 4px;
    padding: 0.05rem 0.3rem !important;
    font-size: 0.65rem !important;
    transition: all 0.2s ease;
}

.btn-mention-participant:hover {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
}

/* =====================================================
   HOT CHAT SUGGESTION BANNER (PREMIUM GLASSMORPHIC)
   ===================================================== */
.hot-chat-suggestion-banner {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(220, 53, 69, 0.22) !important;
    box-shadow: 0 4px 18px rgba(220, 53, 69, 0.06) !important;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hot-chat-suggestion-banner:hover {
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.12) !important;
    border-color: rgba(220, 53, 69, 0.38) !important;
    transform: translateY(-1px);
}

.hot-chat-suggestion-banner .btn-danger {
    background: linear-gradient(135deg, #dc3545, #fd7e14) !important;
    border: none !important;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hot-chat-suggestion-banner .btn-danger:hover {
    transform: scale(1.04) translateY(-0.5px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.32) !important;
}

.hot-chat-suggestion-banner .btn-danger:active {
    transform: scale(0.97);
}

.hot-chat-suggestion-banner .btn-close {
    padding: 0.5rem;
    transition: transform 0.25s ease, background-color 0.2s;
}

.hot-chat-suggestion-banner .btn-close:hover {
    transform: rotate(90deg);
    background-color: rgba(0, 0, 0, 0.05);
}

/* El pane global necesita posicionamiento relativo para que sticky funcione bien */
#pane-global {
    position: relative;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

/* =====================================================
   AUTOCOMPLETE SYSTEM (SUGGESTIONS FOR / AND @)
   ===================================================== */
.chat-autocomplete-list {
    position: absolute;
    bottom: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    margin-bottom: 8px;
    display: none;
}

.chat-autocomplete-header {
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bs-secondary-color, #6c757d);
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-autocomplete-header-tip {
    font-size: 0.62rem;
    font-weight: 400;
    text-transform: none;
    color: var(--bs-secondary-color, #6c757d);
    opacity: 0.85;
}

.chat-autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--bs-body-color, #212529);
    transition: background-color 0.15s ease;
}

.chat-autocomplete-item:hover,
.chat-autocomplete-item.active {
    background-color: var(--bs-tertiary-bg, #f8f9fa);
    color: #dc3545;
    font-weight: 600;
}

.chat-autocomplete-item-desc {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
    margin-left: auto;
}

/* DIRECT BLOCKING BUTTON STYLE */
.block-trigger-direct {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    opacity: 0;
    visibility: hidden;
}

/* On hover or focus-within, reveal buttons */
.chat-message-wrapper:hover .block-trigger-direct,
.chat-message-wrapper:focus-within .block-trigger-direct {
    opacity: 0.85;
    visibility: visible;
}

.block-trigger-direct:hover {
    background-color: #f43f5e !important;
    color: #ffffff !important;
    opacity: 1 !important;
    transform: scale(1.08) translateY(-0.5px);
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.25);
}

/* =====================================================
   GIF PICKER PANEL & INLINE GIFS (GIPHY)
   ===================================================== */
.gif-picker-panel {
    position: absolute;
    bottom: 100%;
    left: 8px;
    width: 320px;
    max-height: 380px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.12);
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.gif-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 6px;
    overflow-y: auto;
    max-height: 280px;
}

.gif-picker-item {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s;
}

.gif-picker-item:hover {
    transform: scale(1.03);
    opacity: 0.85;
}

/* Inline GIF in message bubble */
.gif-message-inline {
    max-width: 280px;
    max-height: 200px;
    border-radius: 12px;
    display: block;
}

/* Ensure strong and b elements display properly in message bubbles */
.message-bubble strong,
.message-bubble b {
    font-weight: 700 !important;
}

/* =====================================================
   GLOBAL CHAT TOAST
   ===================================================== */
.chat-toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    animation: toastSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), toastFadeOut 0.3s ease 1.7s forwards;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

@keyframes toastSlideUp {
    from {
        bottom: 0px;
        opacity: 0;
    }

    to {
        bottom: 32px;
        opacity: 1;
    }
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* =====================================================
   PUSH NOTIFICATION BANNER ANIMATIONS
   ===================================================== */
.animate-slide-down {
    animation: slideDown 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-bounce {
    animation: bounceBell 2s infinite;
}

@keyframes bounceBell {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-6px);
    }

    60% {
        transform: translateY(-3px);
    }
}