/* 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;
}

.rc-popup-overlay--no-blur {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.rc-popup-overlay--hidden {
  display: none !important;
}

/* ── POPUP CONTAINER ── */
.rc-popup {
  --rc-tx: 0px; /* used by animations to preserve translateX for centered variant */
  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: translateX(var(--rc-tx)) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(var(--rc-tx)) translateY(0);
  }
}

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

/* ── MOBILE: full width, override any theme width injection ── */
@media (max-width: 767px) {
  .rc-popup {
    width: auto !important;
    max-width: none !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 16px !important;
  }
}

/* ── DESKTOP POSITION VARIANTS ── */
@media (min-width: 768px) {
  /* shared desktop base */
  .rc-popup--bottom-right,
  .rc-popup--bottom-left,
  .rc-popup--bottom-center {
    bottom: 20px;
    width: 380px !important;
    max-width: 380px !important;
    left: auto !important;
    right: auto !important;
  }

  .rc-popup--bottom-right {
    right: 20px !important;
  }

  .rc-popup--bottom-left {
    left: 20px !important;
  }

  .rc-popup--bottom-center {
    left: 50% !important;
    --rc-tx: -50%;
  }
}

/* ── 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;
  width: 100%;
  box-sizing: border-box;
}

/* ── 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; }
}

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

/* Standalone stat badge (outside bubble) */
.rc-stat-row--standalone {
  margin-top: 0;
  margin-bottom: 12px;
}

.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;
}

/* ── GOOGLE PLACES AUTOCOMPLETE ── */
/* Ensure the dropdown renders above the popup overlay */
.pac-container {
  z-index: 9999999 !important;
}

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

/* WhatsApp button directly inside popup inner (no wrapper div) */
.rc-popup-inner > .rc-cta-whatsapp {
  margin-bottom: 4px;
}

.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: #868e96;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1.4;
}

/* ── EMBEDDED FORM ── */

/* Wider popup on desktop when a CF7 form is embedded */
@media (min-width: 768px) {
  .rc-popup--with-form.rc-popup--bottom-right,
  .rc-popup--with-form.rc-popup--bottom-left,
  .rc-popup--with-form.rc-popup--bottom-center {
    width: 460px !important;
    max-width: 460px !important;
  }
}

/* Form title */
.rc-popup-form-title {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
  margin: 0 0 10px;
  line-height: 1.3;
}

@media (min-width: 768px) {
  .rc-popup-form-title {
    font-size: 16px;
  }
}

/* Allow taller popup to accommodate the form */
.rc-popup--with-form {
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #dee2e6 transparent;
}

.rc-popup-form {
  margin-bottom: 4px;
}

/* ── "of" DIVIDER ── */

.rc-popup-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  color: #adb5bd;
  font-size: 12px;
  font-weight: 500;
}

.rc-popup-divider::before,
.rc-popup-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e9ecef;
}

/* ── WHATSAPP AS SECONDARY (when form is also shown) ── */

.rc-cta-whatsapp--secondary {
  padding: 10px 16px;
  font-size: 13.5px;
  background: #f6fef9;
  color: #1eba58;
  border: 1.5px solid #b9f0cd;
}

.rc-cta-whatsapp--secondary:hover,
.rc-cta-whatsapp--secondary:focus-visible {
  background: #edfbf3;
  border-color: #86e6b0;
  color: #1eba58;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.15);
}

/* ── MULTISTEP FORM INSIDE POPUP — light-background overrides ── */
/* The multistep CSS assumes a dark background (Salient theme).
   These overrides make inactive circles and lines visible on white. */

.rc-popup .rc-multistep {
  --rc-line-bg: #e9ecef;
  --rc-circle-border: #ced4da;
  --rc-circle-text: #868e96;
}

/* Back button: swap dark-border assumption for visible light-theme border */
.rc-popup .rc-multistep .rc-btn-group .rc-btn-back {
  border-color: #dee2e6 !important;
  color: #495057 !important;
  opacity: 1;
}

.rc-popup .rc-multistep .rc-btn-group .rc-btn-back:hover {
  opacity: 0.75;
  border-color: #adb5bd !important;
}

/* Tighten progress bar spacing inside popup */
.rc-popup .rc-multistep .rc-progress {
  margin-bottom: 14px !important;
}

/* ── INPUT FIELD OVERRIDES (fight Salient's large field styles) ──────────── */

.rc-popup .rc-multistep input[type="text"],
.rc-popup .rc-multistep input[type="email"],
.rc-popup .rc-multistep input[type="tel"],
.rc-popup .rc-multistep input[type="number"],
.rc-popup .rc-multistep input[type="url"],
.rc-popup .rc-multistep input[type="search"],
.rc-popup .rc-multistep input[type="date"],
.rc-popup .rc-multistep textarea,
.rc-popup .rc-multistep select {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 11px 14px !important;
  height: auto !important;
  min-height: 0 !important;
  line-height: 1.4 !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: #212529 !important;
  background: #f8f9fa !important;
  border: 1.5px solid #dee2e6 !important;
  border-radius: 10px !important;
  outline: none !important;
  box-shadow: none !important;
  margin: 0 !important;
  transition: border-color 0.15s ease, background 0.15s ease !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.rc-popup .rc-multistep input[type="text"]:focus,
.rc-popup .rc-multistep input[type="email"]:focus,
.rc-popup .rc-multistep input[type="tel"]:focus,
.rc-popup .rc-multistep input[type="number"]:focus,
.rc-popup .rc-multistep input[type="url"]:focus,
.rc-popup .rc-multistep textarea:focus,
.rc-popup .rc-multistep select:focus {
  border-color: var(--rc-accent, #00b8d9) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(0, 184, 217, 0.1) !important;
}

.rc-popup .rc-multistep input::placeholder,
.rc-popup .rc-multistep textarea::placeholder {
  color: #adb5bd !important;
  opacity: 1 !important;
}

/* Kill any Salient wrappers / pseudo-elements on inputs inside popup */
.rc-popup .rc-multistep .wpcf7-form-control-wrap::before,
.rc-popup .rc-multistep .wpcf7-form-control-wrap::after,
.rc-popup .rc-multistep p::before,
.rc-popup .rc-multistep p::after {
  display: none !important;
}

/* Tight paragraph wrappers from CF7 inside popup */
.rc-popup .rc-multistep fieldset.rc-step > p {
  margin: 0 0 8px !important;
  padding: 0 !important;
}

.rc-popup .rc-multistep fieldset.rc-step > p:last-child {
  margin-bottom: 0 !important;
}

/* Kill empty paragraphs (blank lines in CF7 template become <p><br></p>) */
.rc-popup .rc-multistep fieldset.rc-step > p:empty,
.rc-popup .rc-multistep fieldset.rc-step > br {
  display: none !important;
}

/* Kill the <p> wrapping the hidden submit button — it still eats space */
.rc-popup .rc-multistep fieldset.rc-step > p:last-of-type:has(input[type="submit"]),
.rc-popup .rc-multistep fieldset.rc-step > p:last-of-type:has(.wpcf7-submit) {
  display: none !important;
  margin: 0 !important;
}

.rc-popup .rc-multistep fieldset.rc-step .wpcf7-form-control-wrap {
  display: block !important;
  margin-bottom: 0 !important;
}

/* Textarea: limit height inside popup */
.rc-popup .rc-multistep textarea {
  min-height: 80px !important;
  resize: vertical !important;
}

/* ── AVATAR IMAGE ── */
.rc-avatar--image {
  background: #f1f3f5 !important;
  overflow: hidden;
}

.rc-avatar--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* ── URGENCY TIMER ── */
.rc-urgency-timer {
  background: linear-gradient(135deg, #ff6b35 0%, #f9a825 100%);
  border-radius: 10px;
  padding: 12px 14px 10px;
  margin-bottom: 10px;
  text-align: center;
}

.rc-timer-title {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.rc-timer-display {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

.rc-timer-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 48px;
}

.rc-timer-num {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

.rc-timer-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.rc-timer-sep {
  font-size: 22px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1;
  padding-top: 1px;
}

.rc-timer-expired {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

/* =========================================================
   BAR MODE — persistent floating action bar + services menu
   Root: #rc-bar / .rc-bar  (always visible, no overlay)
   --rcb-red can be overridden inline from salient_redux accent.
   ========================================================= */
.rc-bar {
  --rcb-red: #e8202a;
  --rcb-red-dark: #c41620;
  --rcb-text: #1b1b1f;
  --rcb-muted: #8b8e96;
  --rcb-line: #ececed;
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 600px;
  z-index: 99998;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  /* Pinned to Prompt (loaded by the plugin) so the bar font is identical on every theme. */
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}
.rc-bar *, .rc-bar *::before, .rc-bar *::after { box-sizing: border-box; font-family: inherit; }

/* services menu card (above the bar) */
.rc-bar__menu {
  width: 420px;
  max-width: 100%;
  margin: 0 auto;
  order: -1;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 26px 60px -22px rgba(18,20,30,.32), 0 6px 18px -10px rgba(18,20,30,.14);
  padding: 0 24px;
  opacity: 0;
  transform: translateY(14px) scale(.97);
  transform-origin: bottom center;
  pointer-events: none;
  max-height: 0;
  overflow: hidden;
  transition: opacity .26s ease, transform .26s ease, max-height .3s ease, padding .26s ease;
}
.rc-bar.is-open .rc-bar__menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  max-height: 560px;
  padding: 14px 24px;
}
.rc-bar__row {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 15px 6px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--rcb-text);
  transition: background .14s ease;
}
.rc-bar__row:hover { background: #f7f7f8; }
.rc-bar__row + .rc-bar__row { border-top: 1px solid var(--rcb-line); }
.rc-bar__row-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  flex: 0 0 auto;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(232,32,42,.10);
  color: var(--rcb-red);
}
.rc-bar__row-icon svg { width: 19px; height: 19px; display: block; }
.rc-bar__row-text { display: flex; flex-direction: column; }
.rc-bar__row-title { font-size: 15.5px; font-weight: 600; letter-spacing: .1px; margin-bottom: 3px; line-height: 1.2; }
.rc-bar__row-sub { font-size: 12.5px; color: var(--rcb-muted); line-height: 1.45; }

/* the pill bar */
.rc-bar__inner {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 18px 50px -14px rgba(18,20,30,.30), 0 4px 14px -8px rgba(18,20,30,.16);
  padding: 8px;
}
.rc-bar__item {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  color: var(--rcb-text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  padding: 7px 6px;
  border-radius: 16px;
  position: relative;
  transition: background .16s ease, color .16s ease, transform .18s ease, box-shadow .18s ease;
}
.rc-bar__item:hover { background: #f5f5f7; }
/* keep label + icon colour on hover (beat theme a:hover colour); CTA keeps its own white */
#rc-bar .rc-bar__item:not(.rc-bar__cta):hover,
#rc-bar .rc-bar__item:not(.rc-bar__cta):focus { color: var(--rcb-text) !important; }
.rc-bar__item svg { width: 22px; height: 22px; display: block; }
.rc-bar__label { font-size: 13px; font-weight: 600; letter-spacing: .1px; line-height: 1; }
.rc-bar__caret { width: 15px; height: 15px; color: var(--rcb-muted); transition: transform .22s ease; }
.rc-bar.is-open .rc-bar__item--diensten .rc-bar__caret { transform: rotate(180deg); color: var(--rcb-text); }

/* center CTA — red pill */
.rc-bar__cta {
  flex: 0 0 auto;
  min-width: 178px;
  background: var(--rcb-red);
  color: #fff;
  flex-direction: row;
  gap: 10px;
  padding: 0 22px;
  border-radius: 100px !important; /* pill — beat themes that force a small button radius */
  margin: 0 3px;
  box-shadow: 0 12px 26px -10px rgba(232,32,42,.6);
}
.rc-bar__cta:hover { background: var(--rcb-red-dark); }
.rc-bar__cta svg { width: 21px; height: 21px; }
.rc-bar__cta .rc-bar__label { font-size: 15px; font-weight: 700; }
/* ID-specificity radius so it beats theme button rules that use !important */
#rc-bar .rc-bar__cta { border-radius: 100px !important; }
.rc-bar.is-cta-active .rc-bar__cta { transform: translateY(-2px); box-shadow: 0 18px 34px -10px rgba(232,32,42,.75); }

/* active-state dot under the Offerte button */
.rc-bar__cta::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%) scale(0);
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  transition: transform .18s ease;
}
.rc-bar.is-cta-active .rc-bar__cta::after { transform: translateX(-50%) scale(1); }

/* lean layout (no Diensten services): Chat · Offerte · Phone, Offerte centered */
.rc-bar--lean { max-width: 440px; }
.rc-bar--lean .rc-bar__item--chat   { order: 1; }
.rc-bar--lean .rc-bar__cta          { order: 2; }
.rc-bar--lean .rc-bar__item--bellen { order: 3; }

.rc-bar__label--short { display: none; }

/* mobile / compact */
@media (max-width: 720px) {
  .rc-bar { max-width: 430px; width: calc(100% - 24px); }
  .rc-bar__inner { gap: 2px; padding: 8px; }
  .rc-bar__item { gap: 6px; padding: 9px 4px; }
  .rc-bar__item svg { width: 21px; height: 21px; }
  .rc-bar__label { font-size: 11px; }
  .rc-bar__label--full { display: none; }
  .rc-bar__label--short { display: inline; }
  #rc-bar .rc-bar__cta {
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    width: 66px;
    height: 66px;
    align-self: center;          /* beat the bar's stretch so it stays square */
    padding: 0 4px;
    border-radius: 20px !important; /* squircle — ID specificity beats theme button radius */
    margin: -16px 2px 0;
  }
  .rc-bar__cta svg { width: 22px; height: 22px; }
  .rc-bar__cta .rc-bar__label { font-size: 11px; font-weight: 700; }
  /* nudge the active dot up so it clears the bar on the raised square */
  .rc-bar__cta::after { bottom: 8px; }
}
