/* RedCommerce Popup — Frontend styles
   All selectors are prefixed .rc- to avoid conflicts with Salient / WPBakery */

/* ── OVERLAY ── */
.rc-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 999998;
}

/* ── POPUP CONTAINER ── */
.rc-popup {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  overflow: hidden;
  z-index: 999999;
  font-family: inherit;
}

/* Show state — triggers slide-up animation */
.rc-popup--visible {
  animation: rc-slideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Hide state — quick fade + slide down */
.rc-popup--hiding {
  animation: rc-slideDown 0.25s ease forwards;
}

@keyframes rc-slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rc-slideDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(10px);
  }
}

/* ── DESKTOP LAYOUT ── */
@media (min-width: 768px) {
  .rc-popup {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: 380px;
  }
}

/* ── CLOSE BUTTON ── */
.rc-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f1f3f5;
  color: #adb5bd;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  z-index: 2;
  padding: 0;
}
.rc-popup-close:hover {
  background: #e9ecef;
  color: #343a40;
}

/* ── INNER PADDING ── */
.rc-popup-inner {
  padding: 18px 18px 16px;
}

/* ── INSTRUCTOR ROW ── */
.rc-instructor {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.rc-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
  position: relative;
}

/* Online dot via pseudo-element */
.rc-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #25D366;
  border-radius: 50%;
  border: 2px solid #ffffff;
}

.rc-instructor-info {
  flex: 1;
  min-width: 0;
}

.rc-instructor-name {
  font-size: 14px;
  font-weight: 600;
  color: #212529;
  line-height: 1.2;
}

.rc-instructor-status {
  font-size: 12px;
  color: #25D366;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* Pulse animation on status dot SVG */
.rc-instructor-status svg {
  animation: rc-pulse 2s ease-in-out infinite;
}

@keyframes rc-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

/* ── CHAT BUBBLE ── */
.rc-bubble {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  border-top-left-radius: 4px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.rc-bubble-text {
  font-size: 14px;
  color: #343a40;
  line-height: 1.5;
}

/* ── STAT BADGE ── */
.rc-stat-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.rc-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: rgba(37, 211, 102, 0.08);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1eba58;
}

.rc-stat-badge svg {
  flex-shrink: 0;
}

/* ── CTA BUTTONS ── */
.rc-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rc-cta-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  background: #25D366;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  line-height: 1;
}

.rc-cta-whatsapp:hover,
.rc-cta-whatsapp:focus-visible {
  background: #1eba58;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.25);
  color: #ffffff;
  text-decoration: none;
}

.rc-cta-whatsapp:active {
  transform: translateY(0);
}

.rc-cta-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 16px;
  background: transparent;
  color: #868e96;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  line-height: 1;
}

.rc-cta-call:hover,
.rc-cta-call:focus-visible {
  border-color: #ced4da;
  color: #343a40;
  background: #f8f9fa;
  text-decoration: none;
}

/* ── PRIVACY LINE ── */
.rc-privacy {
  text-align: center;
  margin-top: 10px;
  font-size: 11px;
  color: #ced4da;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.4;
}
