/* WA Widget — Rosenbaum Advogados */
/* Hide old Octadesk elements */
#newOctaChat2,
.octadesk-proactive-msg-wrapper,
#floatWhatsapp {
  display: none !important;
}

/* Widget container */
.rb-wa-widget {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 99999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Floating button */
.rb-wa-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}
.rb-wa-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.rb-wa-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
.rb-wa-btn.rb-pulse {
  animation: rb-pulse-ring 2s ease-out infinite;
}
@keyframes rb-pulse-ring {
  0% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 14px rgba(37,211,102,0); }
  100% { box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 0 0 0 rgba(37,211,102,0); }
}

/* Badge */
.rb-wa-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.rb-wa-badge.rb-show {
  display: flex;
}

/* Form card */
.rb-wa-card {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 340px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  overflow: hidden;
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease-out, opacity 0.25s ease-out;
}
.rb-wa-card.rb-open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Card header */
.rb-wa-header {
  background: #075E54;
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.rb-wa-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rb-wa-header-avatar svg {
  width: 24px;
  height: 24px;
  fill: #fff;
}
.rb-wa-header-text h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.rb-wa-header-text p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.85;
}
.rb-wa-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  opacity: 0.7;
}
.rb-wa-close:hover { opacity: 1; }

/* Card body */
.rb-wa-body {
  padding: 16px;
}
.rb-wa-body p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #555;
  line-height: 1.4;
}
.rb-wa-field {
  margin-bottom: 10px;
}
.rb-wa-field input,
.rb-wa-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.rb-wa-field input:focus,
.rb-wa-field select:focus {
  border-color: #25D366;
  outline: none;
  background: #fff;
}
.rb-wa-field input::placeholder { color: #aaa; }

.rb-wa-submit {
  width: 100%;
  height: 48px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
  margin-top: 4px;
}
.rb-wa-submit:hover { background: #1fb855; }
.rb-wa-submit:disabled {
  background: #ccc;
  cursor: not-allowed;
}
.rb-wa-submit svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

.rb-wa-footer {
  padding: 8px 16px 12px;
  text-align: center;
  font-size: 11px;
  color: #999;
}

/* ── A11y: Contrast fixes ────────────────────────── */
/* Gold subtitle on dark bg: #b091xx → #d4b872 (ratio 4.5+) */
.especialidades-box-subtitle {
  color: #d4b872 !important;
}
/* Gold headings/subtitles: #b091xx → #d4b872 */
h2.sub-title,
.cabecalho h5,
.cabecalho h2 {
  color: #d4b872 !important;
}
/* Links in article body (voo-cancelado etc): #c284xx → #a06030 (4.5+ on white) */
.entry-content a {
  color: #a06030 !important;
}
.entry-content a:hover {
  color: #7a4820 !important;
}
/* Sidebar form text + placeholders: #5a49xx → #3d3255 (4.5+ ratio) */
.block-form-contato-text {
  color: #3d3255 !important;
}
#block-form-contato input::placeholder,
#block-form-contato textarea::placeholder {
  color: #6b5f80 !important;
}
/* Old modal + Octadesk: hide completely (prevents flash) */
#chat-online-rosenbaum,
#whatsapp-icon,
#whatsapp-text,
.modal-backdrop {
  display: none !important;
}

/* Mobile responsive */
@media (max-width: 480px) {
  .rb-wa-card {
    width: calc(100vw - 32px);
    right: 0;
    bottom: 70px;
    border-radius: 16px;
  }
  .rb-wa-btn {
    width: 52px;
    height: 52px;
  }
  .rb-wa-btn svg {
    width: 26px;
    height: 26px;
  }
}
