:root{
  --sol-primary:#01448A;
  --sol-bg:#ffffff;
  --sol-text:#1f2937;
  --sol-muted:#6b7280;
  --sol-border:#e5e7eb;
  --sol-shadow:0 10px 25px rgba(0,0,0,.15);
  --sol-radius:16px;
  --sol-z:2147483000;         /* painel */
  --sol-z-overlay:2147482990; /* overlay */
}

/* Herda a tipografia global do site */
.sol-panel,
.sol-launcher,
.sol-panel *,
.sol-launcher *,
.sol-item,
.sol-btn,
.sol-back {
  font: inherit;
  font-family: inherit;
}

/* ===== Toggle ===== */
.sol-toggle{ position:fixed; opacity:0; pointer-events:none; }
.sol-toggle:checked + .sol-launcher{ display:none; }
.sol-toggle:checked ~ .sol-panel{ display:flex; }
.sol-toggle:checked ~ .sol-overlay{ display:block; }

/* ===== Botão flutuante ===== */
.sol-launcher{
  position:fixed; bottom:24px; right:24px; z-index:var(--sol-z);
  display:flex; align-items:center; gap:.75rem;
  background:var(--sol-bg); border:1px solid var(--sol-border);
  border-radius:999px; box-shadow:var(--sol-shadow);
  padding:.5rem .75rem .5rem .5rem; cursor:pointer;
}
.sol-avatar{
  width:42px; height:42px; border-radius:50%;
  flex:none; background:var(--sol-primary); color:#fff;
  display:grid; place-items:center; font-weight:700;
}
.sol-photo{
  width:42px; height:42px; border-radius:50%;
  flex:none; object-fit:cover; display:block;
}
.sol-greeting{ font-size:.95rem; color:var(--sol-text); max-width:300px; }
.sol-greeting strong{ display:block; font-weight:700; }

/* ===== Painel ===== */
section.sol-panel{
  position:fixed; bottom:24px; right:24px; width:380px;
  max-height:90vh;
  z-index:var(--sol-z); background:var(--sol-bg); border:1px solid var(--sol-border);
  border-radius:var(--sol-radius); box-shadow:var(--sol-shadow);
  display:none; flex-direction:column; overflow:hidden;
  padding:0 !important;
  box-sizing:border-box;

  /* 🔹 Espaço fixo no rodapé do painel */
  padding-bottom:12px;
}

.sol-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:.75rem; background:#f8fafc; border-bottom:1px solid var(--sol-border);
}
.sol-title{ display:flex; align-items:center; gap:.6rem; color:var(--sol-text); }
.sol-title img{ width:36px; height:36px; border-radius:50%; object-fit:cover; }
.sol-title-text{ display:flex; flex-direction:column; }
.sol-title-text strong{ font-weight:700; }
.sol-title-text small{ font-size:.8rem; color:var(--sol-muted); }
.sol-actions{ display:flex; gap:.25rem; }
.sol-btn{ all:unset; cursor:pointer; padding:.35rem; border-radius:10px; color:var(--sol-muted); }

/* ===== Corpo ===== */
.sol-body{
  flex: 0 0 auto;
  max-height: 45vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: .75rem .65rem;
  background: #fbfdff;
  box-sizing: border-box;
  border-bottom: 1px solid var(--sol-border);
  margin-bottom: 12px; /* 🔹 espaço fixo ANTES das opções */
}

.sol-msg{
  display:flex;
  gap:.5rem;
  align-items:flex-start;
  max-width:96%;   /* 🔹 evita encostar na borda */
  box-sizing:border-box;
}
.sol-msg.bot{ align-self:flex-start; }
.sol-bubble{
  padding:.6rem .8rem;
  border-radius:14px;
  border:1px solid var(--sol-border);
  background:#eef5ff;
  border-color:#dbeafe;
}
.sol-bubble strong{ font-weight:700; }

/* ===== Opções ===== */
.sol-options{
  border-top:1px solid var(--sol-border);
  background:#ffffff;
  padding:.6rem .6rem 1rem !important;
  flex: 0 0 auto;
  max-height: min(400px, 55vh);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sol-list{ 
  display:flex; 
  flex-direction:column; 
}

.sol-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  border:1px solid var(--sol-border);
  border-radius:12px;
  padding:.55rem .8rem;
  background:#fff;
  cursor:pointer;
  text-align:left !important;
  width:100%;
  box-sizing:border-box;
  margin-bottom:.6rem;
}
.sol-item:last-child{ margin-bottom:0; }
.sol-item:hover{ background:#f7fbff; }

.sol-item .txt{ flex:1; }
.sol-item span:last-child{
  margin-left:auto;
  color:#9ca3af;
}

/* Botão Voltar */
.sol-back{
  display:flex; align-items:center; gap:.5rem; justify-content:center;
  padding:.55rem .75rem; border:1px dashed var(--sol-border);
  border-radius:12px; background:#fff; cursor:pointer;
  margin:4px 0 0 0;
}
.sol-back:hover{ background:#f7fbff; }
.sol-options > *:last-child{ margin-bottom:0 !important; }

/* ===== Overlay ===== */
.sol-overlay{ display:none; position:fixed; inset:0; z-index:var(--sol-z-overlay); background:transparent;
  margin:0 !important; padding:0 !important;}

/* ===== Tipografia ===== */
.sol-panel .sol-body,
.sol-panel .sol-options{
  font-size:0.92em;
  line-height:1.32;
}
.sol-panel .sol-item .txt small{ line-height:1.2; }
.sol-panel .sol-bubble{ line-height:1.32; }

/* ===== Responsivo ===== */
@media (max-width:640px){
  section.sol-panel{ inset:0; width:100vw; height:100dvh; right:0; bottom:0; border-radius:0; max-height:100dvh; padding-bottom:12px; }
  .sol-launcher{ right:16px; bottom:16px; }
  .sol-item{ padding:.55rem .8rem; }
  .sol-body{ max-height:50dvh; padding:.75rem .65rem; }
  .sol-options{ flex:1 1 auto; max-height:none; }
  .sol-msg{ max-width:96%; }
}

.sol-panel .text-muted { display:block; text-align:right; }