/* Ramaya Chat Now — self-contained (no Bootstrap) */

.rcn-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.rcn-floating-btn {
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: #198754;
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rcn-floating-btn:hover,
.rcn-floating-btn:focus-visible {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(25, 135, 84, 0.55);
  outline: none;
}

.rcn-wa-icon {
  display: block;
}

.rcn-modal {
  width: min(18rem, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  overflow: hidden;
}

.rcn-modal.is-open {
  opacity: 1;
  transform: translateY(0);
}

.rcn-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.rcn-modal__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.rcn-modal__close {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.35rem;
}

.rcn-modal__body {
  padding: 0.95rem 1rem 1.1rem;
}

.rcn-label {
  display: block;
  margin: 0.55rem 0 0.28rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
}

.rcn-label:first-child {
  margin-top: 0;
}

.rcn-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  color: #0f172a;
  background: #fff;
}

.rcn-input:focus {
  outline: 2px solid rgba(25, 135, 84, 0.25);
  border-color: #198754;
}

.rcn-submit {
  width: 100%;
  margin-top: 0.85rem;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: #6c757d;
  cursor: not-allowed;
  opacity: 0.7;
}

.rcn-submit.is-ready {
  background: #198754;
  cursor: pointer;
  opacity: 1;
}

.rcn-status {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  padding: 0.5rem 0.6rem;
  border-radius: 6px;
}

.rcn-status.is-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.rcn-status.is-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

@keyframes rcn-bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

@keyframes rcn-pulse {
  0% { box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4); }
  50% { box-shadow: 0 4px 12px rgba(25, 135, 84, 0.8), 0 0 0 10px rgba(25, 135, 84, 0.1); }
  100% { box-shadow: 0 4px 12px rgba(25, 135, 84, 0.4); }
}

@keyframes rcn-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rcn-floating-btn.bounce { animation: rcn-bounce 2s infinite; }
.rcn-floating-btn.pulse { animation: rcn-pulse 2s infinite; }
.rcn-floating-btn.loading { animation: rcn-rotate 1s linear infinite; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  .rcn-floating-btn.bounce,
  .rcn-floating-btn.pulse,
  .rcn-floating-btn.loading {
    animation: none;
  }
}
