/* ============================================================
   RydNxt Smart Floating WhatsApp & Mountain Bot Widget
   ============================================================ */

.rm-floating-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Floating Launcher Button */
.rm-chat-launcher {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.45), 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  outline: none;
}

.rm-chat-launcher:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 14px 34px rgba(37, 211, 102, 0.55), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.rm-chat-launcher:active {
  transform: scale(0.96);
}

.rm-launcher-pulse {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0;
  animation: rmPulseRing 2.4s infinite cubic-bezier(0.24, 0, 0.38, 1);
  pointer-events: none;
}

@keyframes rmPulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}

.rm-launcher-icon {
  width: 32px;
  height: 32px;
  fill: currentColor;
  transition: transform 0.3s ease;
}

.rm-launcher-close {
  display: none;
  font-size: 26px;
  line-height: 1;
  font-weight: 300;
}

.rm-floating-container.active .rm-launcher-icon {
  display: none;
}

.rm-floating-container.active .rm-launcher-close {
  display: block;
}

/* Tooltip Badge */
.rm-launcher-badge {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #0B1B3D;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(11, 27, 61, 0.25);
  border: 1px solid rgba(255, 165, 0, 0.3);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 1;
  transition: all 0.3s ease;
}

.rm-launcher-badge::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #0B1B3D;
}

.rm-badge-dot {
  width: 8px;
  height: 8px;
  background: #25D366;
  border-radius: 50%;
  animation: rmBlink 1.4s infinite;
}

@keyframes rmBlink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.rm-floating-container.active .rm-launcher-badge {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) scale(0.9);
}

/* Chat Card Window */
.rm-chat-box {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 375px;
  max-width: calc(100vw - 32px);
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(11, 27, 61, 0.28), 0 0 0 1px rgba(11, 27, 61, 0.08);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.94);
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.rm-floating-container.active .rm-chat-box {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Chat Header */
.rm-chat-header {
  background: linear-gradient(135deg, #0B1B3D 0%, #162D59 100%);
  color: #ffffff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(255, 165, 0, 0.3);
}

.rm-header-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rm-header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  border: 2px solid #25D366;
  font-size: 22px;
}

.rm-status-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: #25D366;
  border-radius: 50%;
  border: 2px solid #0B1B3D;
}

.rm-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.rm-header-subtitle {
  font-size: 11px;
  color: #10B981;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.rm-header-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #ffffff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s ease;
}

.rm-header-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Chat Body */
.rm-chat-body {
  padding: 16px;
  background: #F8FAFC;
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rm-chat-body::-webkit-scrollbar {
  width: 4px;
}
.rm-chat-body::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

/* Message Bubble */
.rm-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 90%;
  animation: rmFadeUp 0.3s ease;
}

@keyframes rmFadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.rm-message.bot {
  align-self: flex-start;
}

.rm-bubble {
  background: #ffffff;
  color: #1E293B;
  padding: 12px 14px;
  border-radius: 16px 16px 16px 4px;
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid #E2E8F0;
}

.rm-time {
  font-size: 10px;
  color: #94A3B8;
  padding-left: 4px;
}

/* Quick Question Chips */
.rm-quick-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748B;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.rm-quick-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rm-chip {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #0B1B3D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s ease;
  text-align: left;
}

.rm-chip:hover {
  background: #EFF6FF;
  border-color: #FFA500;
  color: #0B1B3D;
  transform: translateX(3px);
}

.rm-chip span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rm-chip .rm-chip-arrow {
  color: #FFA500;
  font-size: 14px;
  font-weight: bold;
}

/* Interactive Answer Box */
.rm-answer-card {
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  color: #14532D;
  line-height: 1.5;
  display: none;
}

.rm-answer-card.active {
  display: block;
  animation: rmFadeUp 0.25s ease;
}

/* Chat Footer / Direct Action Area */
.rm-chat-footer {
  padding: 14px 16px;
  background: #ffffff;
  border-top: 1px solid #E2E8F0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rm-btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: all 0.2s ease;
}

.rm-btn-whatsapp:hover {
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.rm-btn-call {
  background: #F1F5F9;
  color: #0B1B3D;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.rm-btn-call:hover {
  background: #E2E8F0;
  color: #0B1B3D;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
  .rm-floating-container {
    bottom: 16px;
    right: 16px;
  }
  .rm-chat-box {
    width: calc(100vw - 32px);
    bottom: 70px;
    right: 0;
  }
  .rm-launcher-badge {
    display: none;
  }
}
