/* =========================================================
   Chat flutuante - AET System
   Botão e painel de chat (canto inferior direito do viewport)
   ========================================================= */

.chat-trigger {
    position: fixed;
    right: 24px;
    bottom: 112px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 56px;
    height: 56px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: var(--primary-color, #D2691E);
    color: var(--text-white, #ffffff);
    cursor: pointer;

    /* Glow difuso */
    box-shadow:
        0 0 18px rgba(255, 243, 224, 0.45),
        0 4px 14px rgba(0, 0, 0, 0.28);

    transition:
        background-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.25s ease;
}

.chat-trigger:hover {
    background-color: var(--hover-primary, #B8860B);
    transform: translateY(-2px);

    /* Glow mais intenso no hover */
    box-shadow:
        0 0 24px rgba(255, 243, 224, 0.55),
        0 6px 18px rgba(0, 0, 0, 0.30);
}

.chat-trigger__icon {
    flex-shrink: 0;
}

.chat-panel {
    position: fixed;
    right: 24px;
    bottom: 180px;
    z-index: 9998;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);

    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        visibility 0.25s ease;
}

.chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-panel__frame {
    flex: 1 1 auto;
    width: 100%;
    border: none;
    background: #ffffff;
}

@media (max-width: 576px) {
    .chat-trigger {
        right: 16px;
        bottom: 112px;
        width: 48px;
        height: 48px;
    }

    .chat-panel {
        right: 16px;
        bottom: 172px;
    }
}
