
* { box-sizing: border-box; }

body {
    margin: 0;
    background: #f4f7fa;
    overflow-y: hidden;
}

header{
    position: relative;
    width: 100%;
    height: 50px;
    margin: 0 auto;
    display: block;
    top: 0;
    clear: both;
    text-align: center;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 50px;
    background-color: #0b4a75;
}

header h1 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 50px;
}

.content {
    position: relative;
    width: 900px;
    height: 70vh;
    margin: 0 auto;
    display: block;
}

.content .logo{
    position: relative;
    width: 100%;
    height: 120px;
    margin: 0 auto;
    display: block;
    background: url(http://www.impactodesigner.com.br/assets/logo.png) no-repeat center 20px;
    background-size: 230px auto;
    text-indent: -9999px;
}

.content .left,
.content .right{
    position: relative;
    width: 50%;
    height: auto;
    margin: 0 auto;
    display: block;
    float: left;
}

.content .left{
    height: 250px;
    background: url(thumb-chatbot.jpg) no-repeat center;
    background-size: 97% auto;
    text-indent: -9999px;
    border: 2px solid #d5e0e8;
    border-radius: 15px;
    box-shadow: 3px 3px 6px rgba(106, 88, 158, 0.2);
}

p {
    position: relative;
    width: 100%;
    height: auto;
    padding: 20px 0 0 20px;
    margin: 0 auto;
    display: block;
    text-align: left;
    color: #0b4a75;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 20px;
}

p strong{
    font-size: 16px;
    line-height: 25px;
}

.seta{
    position: relative;
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-bottom: 30px solid transparent;
    border-top: 30px solid red; /* Cor da seta */
    float: right;
    right: 140px;
    top: -70px;
    display: inline-block;
    color: #043453; 
    /* Nome da animação | Duração | Modo de transição | Repetição infinita */
    animation: fade-piscar 1s steps(1) infinite;

    /* Rotaciona a seta 45 graus para baixo */
    transform: rotate(45deg);
}

.seta span{
    position: relative;
    width: 240px;
    height: auto;
    padding: 0px;
    margin: 0 auto;
    left: -230px;
    top: 60px;
    display: block;
    text-align: right;
    color: red;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 20px;
    transform: rotate(-45deg);
}

@keyframes fade-piscar {
  0%, 100% {
    opacity: 1; /* Totalmente visível no início e fim */
  }
  50% {
    opacity: 0.2; /* Quase invisível no meio do ciclo */
  }
}

footer {
    position: relative;
    width: 100%;
    height: 40px;
    margin: 0 auto;
    display: block;
    top: 15vh;
    clear: both;
    text-align: center;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 40px;
    background-color: #0b4a75;
}

/* ================= CHATBOT ================= */
:root {
  --cor-principal: #0b4a75; /* troque aqui a cor principal do chatbot */
}

.cb-fab {
    position: fixed;
    right: 30px;
    bottom: 60px;
    width: 62px;
    height: 62px;
    border: none;
    border-radius: 50%;
    background: var(--cor-principal);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(11, 74, 117, .45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s ease;
    animation: cb-pulse 2s infinite;
}
.cb-fab:hover {
    background: var(--cor-principal);
    opacity: .7;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(61, 95, 192, .6);
}
.cb-fab.is-open { animation: none; }
@keyframes cb-pulse {
    0%   { box-shadow: 0 6px 18px rgba(11, 74, 117, .45); }
    50%  { box-shadow: 0 6px 20px rgba(11, 74, 117, .8), 0 0 0 10px rgba(11, 74, 117, .12); }
    100% { box-shadow: 0 6px 18px rgba(11, 74, 117, .45); }
}
.cb-fab svg { width: 30px; height: 30px; fill: #fff; }
.cb-fab .cb-close-icon { display: none; }
.cb-fab.is-open .cb-chat-icon { display: none; }
.cb-fab.is-open .cb-close-icon { display: block; }

.cb-panel {
    position: fixed;
    right: 20px;
    bottom: 130px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 400px;
    max-height: calc(100vh - 130px);
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .28);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    font-family: Arial, Helvetica, sans-serif;
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(.97);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;

    overflow: auto; /* Garante que a barra apareça se o conteúdo passar do tamanho */
    scrollbar-color: var(--cor-principal) #f4f7fa;
    scrollbar-width: thin; /* Opcional: deixa a barra mais fina */

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

.cb-head {
    background: var(--cor-principal);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}
.cb-avatar svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.cb-head h2 { margin: 0; font-size: 15px; }
.cb-head span { font-size: 12px; opacity: .85; }
.cb-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #25d366;
    margin-right: 5px;
    vertical-align: middle;
}

.cb-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    background: #f4f7fa;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-msg {
    max-width: 82%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 20px;
    white-space: pre-wrap;
    word-break: break-word;
    animation: cbPop .18s ease;
}
@keyframes cbPop {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cb-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #1b2b36;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.cb-msg.user {
    align-self: flex-end;
    background: var(--cor-principal);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.cb-msg.alerta {
    align-self: center;
    background: #fff4e5;
    color: #8a5300;
    font-size: 13px;
    max-width: 92%;
}
.cb-msg.erro {
    align-self: center;
    background: #ffe9e9;
    color: #a11;
    font-size: 13px;
    max-width: 92%;
}

.cb-typing {
    align-self: flex-start;
    background: #fff;
    padding: 12px 14px;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.cb-typing i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 4px;
    border-radius: 50%;
    background: #9fb3c0;
    animation: cbBlink 1.2s infinite;
}
.cb-typing i:nth-child(2) { animation-delay: .2s; }
.cb-typing i:nth-child(3) { animation-delay: .4s; margin-right: 0; }
@keyframes cbBlink {
    0%, 60%, 100% { opacity: .3; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-4px); }
}

.cb-options {
    display: flex;
    flex-direction: column;
    gap: 7px;
    align-self: stretch;
    margin-top: 4px;
    animation: cbPop .18s ease;
}
.cb-opt {
    border: 1.5px solid var(--cor-principal);
    background: #fff;
    color: var(--cor-principal);
    border-radius: 20px;
    padding: 9px 14px;
    font: 14px Arial, Helvetica, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.cb-opt:hover { background: var(--cor-principal); color: #fff; }
.cb-opt.wa { border-color: #25d366; color: #128c4b; }
.cb-opt.wa:hover { background: #25d366; color: #fff; }
.cb-opt[disabled] { opacity: .45; pointer-events: none; }

.cb-form {
    align-self: stretch;
    background: #fff;
    border-radius: 12px;
    padding: 13px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    display: flex;
    flex-direction: column;
    gap: 9px;
    animation: cbPop .18s ease;
}
.cb-form label {
    font-size: 12px;
    color: var(--cor-principal);
    font-weight: bold;
}
.cb-form input,
.cb-form textarea {
    width: 100%;
    border: 1.5px solid #d5e0e8;
    border-radius: 8px;
    padding: 9px 10px;
    font: 14px Arial, Helvetica, sans-serif;
    color: #1b2b36;
    background: #fbfdfe;
    resize: vertical;
}
.cb-form input:focus,
.cb-form textarea:focus { outline: none; border-color: var(--cor-principal); }
.cb-form textarea { min-height: 74px; }
.cb-form-actions { display: flex; gap: 8px; }
.cb-form-actions button {
    flex: 1;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font: bold 14px Arial, Helvetica, sans-serif;
    cursor: pointer;
}
.cb-btn-send { background: var(--cor-principal); color: #fff; }
.cb-btn-send:hover { background: var(--cor-principal); opacity: .6; }
.cb-btn-cancel { background: #eef3f7; color: #4a6373; }
.cb-btn-cancel:hover { background: #e0e8ee; }
.cb-btn-send[disabled] { opacity: .6; cursor: wait; }

.cb-foot {
    border-top: 1px solid #e4ecf2;
    padding: 9px 14px;
    font: 11px Arial, Helvetica, sans-serif;
    color: #fff;
    text-align: center;
    background: var(--cor-principal);
}

/* MOBILE - ate width 768px */
@media only all and (max-width: 768px) {
    .content {
        width: 100%;
        height: 80vh;
        background-size: 90%;
    }
    p {
        top: 160px;
        font-size: 16px;
        padding: 20px 15px;
    }

    footer{
        top: 10vh;
    }

    .seta{
        right: 120px;
        top: -120px;
        border-left: 40px solid transparent;
        border-bottom: 40px solid transparent;
        border-top: 40px solid #298fd3;
    }

    .seta span{
        width: 260px;
        left: -250px;
        top: 50px;
        font-size: 18px;
        line-height: 28px;
    }

   .cb-panel {
        right: 8px;
        left: 8px;
        bottom: 180px;
        width: auto;
        max-width: none;
        height: 74vh;
        max-height: none;
    }
    .cb-fab { right: 14px; bottom: 104px; }
}