
/* Floating Action Bar (Bottom Right) */
.conference-chat {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  font-family: Arial, Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #173f35;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* WhatsApp Floating Button */
.whatsapp-launcher {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid #1ebd5b;
  border-radius: 28px;
  background: #25D366;
  color: #ffffff !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
  font: 700 13.5px/1.4 Arial, Helvetica, sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}
.whatsapp-launcher:hover {
  background: #20ba5a;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
  transform: translateY(-2px);
}
.whatsapp-launcher svg {
  flex-shrink: 0;
  display: block;
}

/* WhatsApp Popover Panel */
.whatsapp-popup {
  position: absolute;
  right: 140px;
  bottom: 58px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(11, 56, 29, 0.22);
  overflow: hidden;
  z-index: 60;
  animation: waPopupIn 0.2s ease-out;
}
.whatsapp-popup[hidden] {
  display: none;
}
@keyframes waPopupIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.whatsapp-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #ecfdf5;
  border-bottom: 1px solid #bbf7d0;
  color: #0b381d;
}
.whatsapp-popup-header strong {
  font-size: 14px;
  font-weight: 800;
}
.whatsapp-popup-close {
  border: 0;
  background: none;
  color: #15803d;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.whatsapp-popup-close:hover {
  color: #0b381d;
}
.whatsapp-popup-body {
  padding: 14px;
}
.whatsapp-popup-note {
  margin: 0 0 12px;
  font-size: 11.5px;
  color: #4b6354;
  line-height: 1.45;
}
.whatsapp-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  text-decoration: none;
  color: #0b381d;
  margin-bottom: 9px;
  transition: all 0.2s ease;
}
.whatsapp-contact-card:last-child {
  margin-bottom: 0;
}
.whatsapp-contact-card:hover {
  background: #dcfce7;
  border-color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.15);
}
.whatsapp-flag {
  display: block;
  flex-shrink: 0;
  width: 28px;
  height: 19px;
  border-radius: 2px;
  border: 1px solid #cbd5e1;
  object-fit: cover;
}
.whatsapp-info {
  flex: 1;
  min-width: 0;
}
.whatsapp-info strong {
  display: block;
  font-size: 13px;
  color: #0b381d;
  font-weight: 800;
  line-height: 1.3;
}
.whatsapp-info span {
  display: block;
  font-size: 12px;
  color: #15803d;
  font-weight: 700;
  margin-top: 2px;
}
.whatsapp-action {
  font-size: 11.5px;
  font-weight: 800;
  color: #15803d;
  background: #ffffff;
  padding: 5px 11px;
  border-radius: 15px;
  border: 1px solid #86efac;
  white-space: nowrap;
}
.whatsapp-contact-card:hover .whatsapp-action {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

/* Chatbot Launcher (Existing Ask iRiSeCon) */
.chat-launcher {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 12px 18px;
  border: 1px solid #14532d;
  border-radius: 28px;
  background: #15803d;
  color: #fff !important;
  box-shadow: 0 4px 16px rgba(21, 128, 61, 0.28);
  font: 700 13px/1.4 Arial, sans-serif;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chat-launcher:hover {
  background: #166534;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.38);
  transform: translateY(-2px);
}
.chat-launcher svg {
  flex-shrink: 0;
}

/* Chatbot Panel */
.chat-panel {
  position: absolute;
  right: 0;
  bottom: 58px;
  width: 365px;
  max-width: calc(100vw - 28px);
  border: 1px solid #86efac;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(11, 56, 29, 0.22);
  overflow: hidden;
  z-index: 60;
}
.chat-panel[hidden] {
  display: none;
}
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #dcfce7;
  color: #0b381d;
  gap: 10px;
}
.chat-header strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
  color: #0b381d;
  font-weight: 800;
}
.chat-header span {
  display: block;
  font-size: 10.5px;
  line-height: 1.5;
  color: #14532d;
  font-weight: 600;
}
.chat-close {
  border: 0;
  background: none;
  color: #15803d;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 7px;
}
.chat-close:hover {
  color: #0b381d;
}
.chat-messages {
  max-height: 265px;
  height: 245px;
  overflow-y: auto;
  padding: 14px;
  overscroll-behavior: contain;
}
.chat-message {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  line-height: 1.65;
  max-width: 95%;
}
.chat-message p {
  margin: 0;
  color: inherit;
  font: inherit;
}
.chat-bot {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #0b381d;
}
.chat-user {
  margin-left: auto;
  background: #15803d;
  color: #fff;
}
.chat-message a {
  display: inline-block;
  margin-top: 7px;
  color: #15803d;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.chat-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}
.chat-topics button {
  border: 1px solid #86efac;
  background: #f0fdf4;
  border-radius: 16px;
  padding: 5px 10px;
  font: 700 11px/1.4 Arial, sans-serif;
  color: #15803d;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-topics button:hover {
  background: #dcfce7;
  border-color: #15803d;
}
.chat-form {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-top: 1px solid #bbf7d0;
  background: #fff;
}
.chat-form input {
  width: 100%;
  min-width: 0;
  border: 1px solid #86efac;
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  font: 12px Arial, sans-serif;
  color: #0b381d;
}
.chat-form input:focus {
  outline: 2px solid #15803d;
}
.chat-form > button {
  border: 0;
  border-radius: 7px;
  padding: 8px 14px;
  background: #15803d;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}
.chat-form > button:hover {
  background: #166534;
}
.chat-note {
  padding: 0 13px 10px;
  margin: 0;
  background: #fff;
  font: 9px/1.5 Arial, sans-serif;
  color: #4b6354;
}
.chat-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.conference-chat :focus-visible {
  outline: 3px solid #15803d;
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .conference-chat {
    right: 12px;
    bottom: 12px;
    gap: 8px;
  }
  .chat-launcher, .whatsapp-launcher {
    padding: 10px 14px;
    font-size: 12px;
  }
  .whatsapp-popup {
    right: 0;
    width: calc(100vw - 24px);
  }
  .chat-panel {
    width: calc(100vw - 24px);
    bottom: 54px;
    max-height: calc(100dvh - 90px);
  }
}
