/**
 * ============================================
 * CHAT RHID FULLSCREEN - CSS Atualizado
 * Baseado no widget v6.7.5
 * ============================================
 */

/* Flags sprite (intl-tel-input) */
@import url('https://cdn.jsdelivr.net/npm/intl-tel-input@18.2.1/build/css/intlTelInput.min.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #fafafa;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Sticky */
.user-bar {
    width: 100%;
    min-height: 84px;
    background: linear-gradient(135deg, var(--rhid-primary-color, #B30400) 0%, var(--rhid-secondary-color, #8B0300) 100%);
    color: #fff;
    padding: 22px 20px 20px 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.user-bar > div {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 800px;
    width: 100%;
}

.user-bar .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-bar .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 50%;
}

.user-bar .name {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-bar .name span:first-child {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.user-bar .status {
    font-size: 13px;
    opacity: 0.95;
    font-weight: 400;
    line-height: 1.2;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 84px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--rhid-primary-color, #B30400) 0%, #FF6B6B 100%);
    transition: width 0.5s ease;
    width: 0%;
}

/* Chat Container */
.chat-container {
    flex: 1;
    margin-top: 88px;
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Messages Area */
.messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 20px 80px 20px;
    scroll-behavior: smooth;
    /* Esconder scrollbar (desktop fullscreen) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* Garantir que primeira mensagem nunca fique atrás do header */
    /* Espaço extra para compensar possível scroll manual para cima */
    padding-top: 40px;
}

/* Esconder scrollbar Webkit (Chrome, Safari, Opera) */
.messages::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Message Groups */
.message-group {
    display: flex;
    margin-bottom: 24px;
    animation: messageSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.message-group.bot {
    justify-content: flex-start;
    gap: 12px;
    align-items: flex-start;
}

.message-group.user {
    justify-content: flex-end;
}

/* Avatar Container - Efeito Typebot "andando" com scroll (a partir do step1) */
/* Tamanhos: 40px largura, altura flexível (match Typebot) */
.avatar-wrapper {
    width: 40px;
    min-height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    align-self: stretch; /* Cresce com messages-container (Typebot linha 36) */
    /* CSS variable para altura dinâmica (controlada por JS) */
    --avatar-top: 0px;
}

/* Step0: avatar fixo no topo (comportamento padrão) */
.message-group.bot[data-step="0"] .avatar-wrapper img {
    position: static;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* Step1+: avatar "anda" conforme mensagens crescem */
.message-group.bot:not([data-step="0"]) .avatar-wrapper img {
    position: absolute;
    top: max(0px, calc(var(--avatar-top) - 40px));
    transition: top 400ms ease-out;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.message-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    border-radius: 50%;
}

/* Messages Container */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 70%;
}

/* Message Bubbles */
.message-bubble {
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: pre-wrap;
    line-height: 1.5;
    font-size: 15px;
    width: fit-content;
}

.message-group.bot .message-bubble {
    background: #EBEBEB;
    color: #1F1F1F;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.message-group.user .message-bubble {
    background: linear-gradient(135deg, var(--rhid-primary-color, #B30400) 0%, var(--rhid-secondary-color, #8B0300) 100%);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(179, 4, 0, 0.4);
}

/* Bolha com botão dentro (Step 0) */
.message-group.bot .message-bubble:has(.choice-in-bubble) {
    text-align: left;
    padding-bottom: 14px !important;
    line-height: 1.6;
}

/* Botão dentro da bolha (Step 0 - Aceite) - Estilo Leadster */
.choice-in-bubble {
    background: linear-gradient(135deg, var(--rhid-primary-color, #B30400) 0%, var(--rhid-secondary-color, #8B0300) 100%);
    border: none;
    color: #FFFFFF;
    padding: 11px 26px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 12px rgba(179, 4, 0, 0.3);
    min-height: 42px;
    display: block;
    margin: 12px 0 0 auto !important;
    width: fit-content;
    white-space: nowrap;
    line-height: 1.2;
}

.choice-in-bubble:hover {
    background: linear-gradient(135deg, var(--rhid-secondary-color, #8B0300) 0%, #6B0200 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(179, 4, 0, 0.4);
}

/* Disclaimer dentro da bolha */
.disclaimer-in-bubble {
    font-size: 12px;
    color: #1F1F1F;
    text-align: left;
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
    line-height: 1.4;
    display: block;
}

.disclaimer-in-bubble a {
    color: var(--rhid-primary-color, #B30400);
    text-decoration: underline;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
    background: #EBEBEB;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Choices Container */
.choices-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-bottom: 20px;
    animation: messageSlideIn 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.choices-grid {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    max-width: 100%;
}

.choice-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.choice-bubble {
    background: linear-gradient(135deg, var(--rhid-primary-color, #B30400) 0%, var(--rhid-secondary-color, #8B0300) 100%);
    border: none;
    color: #FFFFFF;
    padding: 14px 20px;
    border-radius: 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 4px 12px rgba(179, 4, 0, 0.3);
    min-height: 48px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.4;
    flex: 1;
}

.choice-bubble:hover {
    background: linear-gradient(135deg, var(--rhid-secondary-color, #8B0300) 0%, #6B0200 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(179, 4, 0, 0.4);
}

.choice-bubble:active {
    transform: translateY(-1px);
}

.disclaimer {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
    max-width: 90%;
}

.disclaimer a {
    color: var(--rhid-primary-color, #B30400);
    text-decoration: underline;
}

/* Input Area (dentro do fluxo de mensagens) */
.input-area {
    padding: 0;
    margin-top: 10px;
    margin-left: auto;
    background: transparent;
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 500px;
}

/* Input Container */
.input-container {
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    border: 2px solid var(--rhid-primary-color, #B30400);
    border-radius: 28px;
    padding: 4px 4px 4px 20px;
    transition: all 0.25s;
    position: relative;
}

.input-container:focus-within {
    border-color: var(--rhid-primary-color, #B30400);
    box-shadow: 0 0 0 3px rgba(179, 4, 0, 0.08);
}

.chat-input {
    flex: 1;
    padding: 12px 8px 12px 0;
    border: none;
    outline: none;
    font-size: 15px;
    min-height: 44px;
    font-weight: 400;
    background: transparent;
    font-family: inherit;
}

.send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rhid-primary-color, #B30400) 0%, var(--rhid-secondary-color, #8B0300) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(179, 4, 0, 0.3);
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 10px rgba(179, 4, 0, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn svg {
    width: 18px;
    height: 18px;
    fill: white;
}

/* Password Toggle */
.toggle-password {
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    z-index: 10;
}

.toggle-password:hover {
    opacity: 0.7;
}

/* Phone Wrapper */
.phone-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--rhid-primary-color, #B30400);
    border-radius: 28px;
    padding: 4px 4px 4px 12px;
    gap: 0;
    flex: 1;
    transition: all 0.25s;
    position: relative;
}

.phone-wrapper:focus-within {
    border-color: var(--rhid-primary-color, #B30400);
    box-shadow: 0 0 0 3px rgba(179, 4, 0, 0.08);
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 10px 10px 8px;
    background: transparent;
    border: none;
    border-right: 1px solid #e0e0e0;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    transition: background 0.2s;
    flex-shrink: 0;
}

.country-selector:hover {
    background: rgba(179, 4, 0, 0.05);
}

.country-selector .code {
    color: #333;
    font-weight: 500;
}

.phone-input {
    flex: 1;
    padding: 12px 8px !important;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    font-size: 15px;
    min-width: 0;
    box-shadow: none !important;
}

.country-dropdown {
    position: absolute;
    bottom: 100%;
    left: 0;
    margin-bottom: 8px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 250px;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 14px;
}

.country-option:hover {
    background: #f5f5f5;
}

/* Input Error */
.input-error {
    background: var(--rhid-primary-color, #B30400);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideInError 0.3s ease;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Animations */
@keyframes messageSlideIn {
    0% {
        opacity: 0;
        transform: scale(0.96) translateY(6px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Leadster Animations */
@keyframes fadeOutScale {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.96);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes popInBounce {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(15px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes zoomRotate {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-180deg);
    }
    60% {
        opacity: 1;
        transform: scale(1.1) rotate(10deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        opacity: 1;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes flipIn {
    0% {
        opacity: 0;
        transform: perspective(400px) rotateX(-90deg);
    }
    40% {
        opacity: 1;
        transform: perspective(400px) rotateX(20deg);
    }
    60% {
        opacity: 1;
        transform: perspective(400px) rotateX(-10deg);
    }
    100% {
        opacity: 1;
        transform: perspective(400px) rotateX(0deg);
    }
}

@keyframes elasticGrow {
    0% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1.25);
    }
    65% {
        opacity: 1;
        transform: scale(0.9);
    }
    80% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes swingIn {
    0% {
        opacity: 0;
        transform: rotate(-10deg) scale(0.8);
    }
    50% {
        opacity: 1;
        transform: rotate(5deg) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Bubble Grow removido - agora usa transition pura estilo Typebot */

/* Animation classes for Leadster-style UX */
.rhid-animate-fadeout {
    animation: fadeOutScale 400ms ease-out forwards;
}

.rhid-animate-popin {
    animation: popIn 600ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    opacity: 0;
}

.rhid-animate-popin-bounce {
    animation: popInBounce 600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform-origin: center;
}

.rhid-animate-slidein {
    animation: messageSlideIn 500ms cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
    opacity: 0;
}

.rhid-animate-fadein {
    animation: fadeIn 400ms ease-out forwards;
    opacity: 0;
}

.rhid-animate-zoomrotate {
    animation: zoomRotate 700ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform-origin: center;
}

.rhid-animate-bouncein {
    animation: bounceIn 800ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
}

.rhid-animate-flipin {
    animation: flipIn 600ms ease-out forwards;
    opacity: 0;
    transform-origin: center bottom;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rhid-animate-elasticgrow {
    animation: elasticGrow 900ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform-origin: center;
}

.rhid-animate-swingin {
    animation: swingIn 700ms cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
    transform-origin: top center;
}

.rhid-animate-bubblegrow {
    transition:
        max-height 1200ms ease-out,
        opacity 800ms ease-out 200ms;
    will-change: max-height, opacity;
    /* GPU acceleration */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.rhid-animate-none {
    opacity: 1;
}

/* ============================================
   EFEITO TYPEBOT (CÓDIGO ORIGINAL CLONADO)
   ============================================ */

/* Fade in do container */
@keyframes typebotFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.rhid-typebot-animate {
    animation: typebotFadeIn 0.3s ease-out forwards;
}

/* Container relativo */
.rhid-typebot-host-bubble {
    display: flex;
    position: relative;
    align-items: flex-start;
    max-width: 100%;
    color: #000;
    overflow: visible; /* Garantir que conteúdo não seja cortado */
    min-height: 48px; /* Altura mínima para conter a animação */
}

/* Bolha ABSOLUTA - SEMPRE VISÍVEL - Timing exato do Typebot (400ms) */
.rhid-typebot-host-bubble > .rhid-bubble-typing {
    transition: width 400ms ease-out, height 400ms ease-out;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    padding: 8px 16px;
    background-color: #EBEBEB;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    /* Otimização GPU - will-change suficiente sem causar overflow issues */
    will-change: width, height;
}

/* Texto fica SOBRE a bolha - Timing exato do Typebot (400ms + 200ms delay) */
.rhid-text-fade-in {
    transition: opacity 400ms ease-in 200ms;
    overflow: hidden;
    padding: 0;
    margin: 8px 16px;
    white-space: normal;
    word-wrap: break-word;
    position: relative;
    color: #000;
    z-index: 2;
    line-height: 1.5;
    /* Otimização GPU para fade-in suave */
    will-change: opacity;
}

/* Bolinhas de typing - NOSSO PADRÃO (melhor que Typebot) */
.rhid-bubble1,
.rhid-bubble2,
.rhid-bubble3 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    /* Opacity 100% - mais visível que Typebot (0.5) */
    animation: typingBounce 1.4s infinite;
}

/* Container das bolinhas com transição suave para fade-out */
.rhid-typing-dots {
    transition: opacity 150ms ease-out;
    will-change: opacity;
}

.rhid-bubble1 {
    animation-delay: 0s;
}

.rhid-bubble2 {
    animation-delay: 0.2s;
}

.rhid-bubble3 {
    animation-delay: 0.4s;
}

/* Nosso keyframe superior: -8px bounce vs -2.5px do Typebot */
@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-8px);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .user-bar {
        min-height: 78px;
        padding: 18px 16px;
        gap: 12px;
    }

    .user-bar .avatar {
        width: 48px;
        height: 48px;
    }

    .user-bar .name span:first-child {
        font-size: 16px;
    }

    .user-bar .status {
        font-size: 13px;
    }

    .progress-bar {
        top: 78px;
        height: 5px;
    }

    .chat-container {
        margin-top: 83px;
    }

    .messages {
        padding: 30px 16px 100px 16px; /* Padding-top aumentado + 84px bottom para margem inferior mobile */
    }

    .message-group {
        margin-bottom: 28px;
    }

    .message-group.bot {
        gap: 14px;
    }

    /* Mobile: 24px largura (match Typebot w-6 h-6) */
    .avatar-wrapper {
        width: 24px;
        min-height: 24px;
        align-self: stretch;
    }

    /* Step0 mobile: avatar fixo */
    .message-group.bot[data-step="0"] .avatar-wrapper img {
        position: static;
        width: 24px;
        height: 24px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    /* Step1+ mobile: avatar andando */
    .message-group.bot:not([data-step="0"]) .avatar-wrapper img {
        width: 24px;
        height: 24px;
        /* Ajustar cálculo para tamanho mobile (24px) */
        top: max(0px, calc(var(--avatar-top) - 24px));
        box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    }

    .messages-container {
        gap: 16px;
    }

    .message-bubble {
        font-size: 16px;
        padding: 16px 20px;
        line-height: 1.6;
    }

    .input-area {
        padding: 0;
        margin-top: 14px;
        margin-bottom: 24px; /* Margem bottom para evitar corte de texto mobile */
        gap: 12px;
        max-width: 100%;
    }

    .input-container,
    .phone-wrapper {
        padding: 6px 6px 6px 20px;
        border-radius: 32px;
    }

    .phone-wrapper {
        padding: 6px 6px 6px 12px;
    }

    .chat-input,
    .phone-input {
        font-size: 17px !important;
        padding: 14px 8px 14px 0;
        min-height: 52px;
    }

    .send-btn {
        width: 52px;
        height: 52px;
    }

    .toggle-password {
        right: 68px;
    }

    .choice-bubble {
        padding: 16px 20px;
        font-size: 15px;
        min-height: 52px;
        max-height: 52px; /* Força altura fixa em 52px */
        white-space: nowrap; /* Impede quebra de linha */
        overflow: hidden;
        text-overflow: ellipsis; /* Adiciona ... se texto muito longo */
        flex: 0 1 auto; /* Remove flex: 1, permite tamanho natural */
    }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {
    .messages {
        padding: 24px 24px 20px 24px;
    }

    .input-area {
        padding: 18px 24px 20px 24px;
    }
}
