/* Daiane Cleaning Services chat widget */
.braga-chat-btn {
  position: fixed;
  right: 18px;
  bottom: 104px;
  width: 140px;
  height: auto;
  z-index: 999998;
  border: 0;
  cursor: pointer;
  background: transparent;
  padding: 0;
  transition: transform .2s ease;
  animation: bragaFloat 3s ease-in-out infinite;
  display: none;
}
.braga-chat-btn:hover { transform: scale(1.06); animation-play-state: paused; }
.braga-chat-avatar {
  width: 140px;
  height: auto;
  display: block;
  border-radius: 16px;
  box-shadow: 0 8px 28px rgba(15,45,70,.2);
}
.braga-chat-btn-text { display: none; }
.braga-chat-btn.braga-chat-btn-textonly {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2ed66f, #20c35b);
  box-shadow: 0 14px 34px rgba(15,45,70,.24);
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #fff;
}
.braga-chat-btn.braga-chat-btn-textonly span:first-child { font-size: 28px !important; line-height: 1; }
.braga-chat-btn.braga-chat-btn-textonly span:last-child { color: #fff !important; font-size: 11px !important; font-weight: 800 !important; letter-spacing: .2px; }
@keyframes bragaFloat { 0% { transform: translateY(0); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0); } }

.braga-chat-window {
  position: fixed;
  right: 24px;
  bottom: 104px;
  width: 560px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 132px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 46px rgba(0,0,0,.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1000000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.braga-chat-header {
  background: linear-gradient(135deg, #0f2d46, #1e5b8f);
  color: #fff;
  padding: 13px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 15px;
}
.braga-chat-close { background: none; border: 0; color: #fff; font-size: 20px; cursor: pointer; opacity: .8; }
.braga-chat-close:hover { opacity: 1; }
.braga-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f6f9fc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.braga-chat-msg {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 86%;
  word-wrap: break-word;
  white-space: pre-wrap;
}
.braga-chat-msg-bot { background: #fff; color: #1b2a3a; align-self: flex-start; box-shadow: 0 3px 12px rgba(15,45,70,.06); }
.braga-chat-msg-user { background: #0f2d46; color: #fff; align-self: flex-end; }
.braga-chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid rgba(15,45,70,.08);
}
.braga-chat-qr, .braga-chat-qr-other {
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 7px 13px;
  transition: transform .2s ease, background .2s ease;
}
.braga-chat-qr { background: #0f2d46; color: #fff; }
.braga-chat-qr:hover { background: #2f86d9; transform: translateY(-1px); }
.braga-chat-qr-other { background: #eaf6ff; color: #0f2d46; border: 1px dashed #2f86d9; }
.braga-chat-input-area {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 13px;
  background: #fff;
  border-top: 1px solid rgba(15,45,70,.08);
}
.braga-chat-input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.braga-chat-input:focus { border-color: #2f86d9; }
.braga-chat-send {
  background: #2f86d9;
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}
.braga-chat-estimate-link {
  display: block;
  text-align: center;
  padding: 11px 14px;
  background: #0f2d46;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}
.dai-bub-braga {
  position: fixed;
  right: 22px;
  bottom: 256px;
  background: #eaf6ff;
  color: #0f2d46;
  padding: 12px 16px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14px;
  font-weight: 800;
  max-width: 260px;
  box-shadow: 0 10px 26px rgba(15,45,70,.18);
  border: 2px solid #2f86d9;
  z-index: 999999;
  line-height: 1.4;
  text-align: center;
  display: none;
}
.dai-bub-braga::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 20px;
  width: 14px;
  height: 14px;
  background: #eaf6ff;
  transform: rotate(45deg);
  border-right: 2px solid #2f86d9;
  border-bottom: 2px solid #2f86d9;
}

/* Mobile */
@media (max-width: 768px) {
  .braga-chat-btn { right: 12px; bottom: 90px; width: 100px; }
  .braga-chat-avatar { width: 100px; }
  .braga-chat-window { right: 12px; bottom: 90px; width: calc(100vw - 24px); max-height: calc(100vh - 110px); }
  .dai-bub-braga { right: 12px; bottom: 200px; max-width: calc(100vw - 48px); font-size: 13px; padding: 10px 14px; }
}
@media (max-width: 480px) {
  .braga-chat-btn { right: 10px; bottom: 80px; width: 85px; }
  .braga-chat-avatar { width: 85px; }
  .braga-chat-window { right: 10px; bottom: 80px; max-height: calc(100vh - 95px); }
  .dai-bub-braga { right: 10px; bottom: 175px; max-width: calc(100vw - 36px); font-size: 12px; padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { .braga-chat-btn { animation: none; } }
