:root {
    /* Cores principais */
    --primary-color: #2e98ee;
    --secondary-color: #1a77c2;

    /* Fundos */
    --background-dark: #1e1e1e;
    --chatbot-background: #2a2a2a;
    --message-bg-bot: #3a3a3a;
    --button-bg: #4a4a4a;
    --button-hover-bg: #5a5a5a;

    /* Texto */
    --text-light: #f0f0f0;
    --text-muted: #aaaaaa;

    /* Estética */
    --shadow-color: rgba(0, 0, 0, 0.5);
    --spacing-unit: 10px;

    /* Bordas */
    --border-radius-xl: 25px;
    --border-radius-lg: 18px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
}

/* FAB */
.chatbot-fab {
    position: fixed;
    bottom: calc(3 * var(--spacing-unit));
    right: calc(3 * var(--spacing-unit));
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 20px var(--shadow-color);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease-in-out;
    outline: none;
    overflow: hidden;
}

.chatbot-fab:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 30px var(--shadow-color);
}

.chatbot-fab img {
    width: 35px;
    height: 35px;
    filter: invert(100%);
}

/* Container do Chatbot */
.chatbot-container {
    position: fixed;
    bottom: calc(11 * var(--spacing-unit));
    right: calc(3 * var(--spacing-unit));
    width: 380px;
    max-height: 550px;
    background-color: var(--chatbot-background);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px var(--shadow-color);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999;
    transform: scale(0.7) translateY(50px);
    opacity: 0;
    transform-origin: bottom right;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.5s ease-out;
}

.chatbot-container.open {
    display: flex;
    transform: scale(1) translateY(0);
    opacity: 1;
}

.chatbot-container.closing {
    transform: scale(0.7) translateY(50px);
    opacity: 0;
}

/* Header */
.chatbot-header {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: calc(1.8 * var(--spacing-unit)) calc(2.5 * var(--spacing-unit));
    border-top-left-radius: var(--border-radius-lg);
    border-top-right-radius: var(--border-radius-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.chatbot-header-info {
    display: flex;
    align-items: center;
}

.chatbot-avatar-header {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    margin-right: calc(1.5 * var(--spacing-unit));
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.chatbot-header h3 {
    margin: 0;
    font-size: 1.35em;
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.chatbot-close-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.6em;
    cursor: pointer;
    padding: calc(0.5 * var(--spacing-unit)) var(--spacing-unit);
    border-radius: var(--border-radius-sm);
    transition: background-color 0.2s, transform 0.2s;
    outline: none;
}

.chatbot-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Corpo */
.chatbot-body {
    flex-grow: 1;
    padding: calc(2 * var(--spacing-unit));
    overflow-y: auto;
    background-color: var(--background-dark);
    color: var(--text-light);
    font-size: 0.98em;
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--background-dark);
}

.chatbot-body::-webkit-scrollbar {
    width: 8px;
}

.chatbot-body::-webkit-scrollbar-track {
    background: var(--background-dark);
    border-radius: var(--border-radius-md);
}

.chatbot-body::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: var(--border-radius-md);
    border: 2px solid var(--background-dark);
}

/* Mensagens */
.chatbot-message-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: calc(2 * var(--spacing-unit));
    max-width: 100%;
}

.chatbot-message-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: calc(1.5 * var(--spacing-unit));
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.chatbot-message-content {
    background-color: var(--message-bg-bot);
    padding: calc(1.4 * var(--spacing-unit)) calc(2 * var(--spacing-unit));
    border-radius: var(--border-radius-xl);
    max-width: calc(100% - 65px);
    word-wrap: break-word;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Opções */
.chatbot-options {
    margin-top: calc(2 * var(--spacing-unit));
    display: flex;
    flex-direction: column;
    gap: var(--spacing-unit);
}

.chatbot-options button,
.chatbot-back-btn {
    display: block;
    width: 100%;
    padding: calc(1.6 * var(--spacing-unit));
    background-color: var(--button-bg);
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius-md);
    text-align: center;
    cursor: pointer;
    font-size: 1.05em;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.chatbot-options button:hover,
.chatbot-back-btn:hover {
    background-color: var(--button-hover-bg);
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}

/* Exceção específica do botão de voltar */
.chatbot-back-btn {
    margin-top: calc(2.5 * var(--spacing-unit));
    font-size: 0.98em;
    font-weight: 400;
    background-color: var(--secondary-color);
}

.chatbot-back-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(104, 117, 235, 0.308);
}

/* Tooltip */
.chatbot-tooltip {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #1a77c2;
    color: white;
    padding: 10px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 9999;
    animation: slideUpFade 0.5s ease forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tooltip-icon {
    width: 22px;
    height: 22px;
}

.hidden {
    display: none;
}


@keyframes openChatbot {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes closeChatbot {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.7) translateY(50px);
    }
}

.chatbot-container.open {
    animation: openChatbot 0.5s ease forwards;
}

.chatbot-container.closing {
    animation: closeChatbot 0.4s ease forwards;
}


/* facebook flt  */
#fb-modal {
  position: fixed;
  z-index: 11000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}

#fb-modal-content {
  position: relative;
  background: white;
  width: 420px;
  max-width: 90%;
  height: 640px;
  margin: 60px auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
}

#fb-close {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  user-select: none;
}
#fb-close:hover {
  color: #1877f2;
}

#fb-modal {
  position: fixed;
  z-index: 11000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
  display: none;
}

#fb-modal-content {
  position: relative;
  background: white;
  width: 430px;
  max-width: 90%;
  height: 640px;
  margin: 60px auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  overflow: hidden;
}

#fb-close {
  position: absolute;
  top: 10px; right: 14px;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  user-select: none;
}
#fb-close:hover {
  color: #1877f2;
}
