/* ==========================================================================
   Register page — industry-aware "live system" showcase
   Lives inside .auth-visual-panel (main-auth.html). RTL-first.
   ========================================================================== */

.reg-showcase {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  flex: 1 1 auto;
  justify-content: center;
}

.reg-showcase-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: #7dd3fc;
  letter-spacing: 0.01em;
}

/* --- Industry tabs ------------------------------------------------------- */
.reg-industry-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.reg-industry-tab {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.reg-industry-tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.reg-industry-tab:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

.reg-industry-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(59, 130, 246, 0.25));
  border-color: rgba(56, 189, 248, 0.7);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
}

/* Auto-rotate progress, fills from the start edge (right in RTL) */
.reg-industry-progress {
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: #00d4ff;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.8);
}

.reg-industry-tab.active .reg-industry-progress {
  animation: regTabProgress var(--reg-scene-ms, 9000ms) linear forwards;
}

.reg-showcase.is-paused .reg-industry-tab.active .reg-industry-progress {
  animation-play-state: paused;
}

@keyframes regTabProgress {
  from { width: 0; }
  to   { width: 100%; }
}

/* --- Live card ----------------------------------------------------------- */
.reg-live-card {
  position: relative;
  border-radius: 18px;
  padding: 1rem 1.1rem 0.9rem;
  background: rgba(10, 25, 55, 0.55);
  border: 1px solid rgba(148, 197, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.reg-live-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  font-size: 0.74rem;
  font-weight: 700;
  color: #e0f2fe;
}

.reg-live-sep { color: #475569; }

.reg-live-sub {
  font-weight: 500;
  color: #94a3b8;
}

.reg-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: regLivePulse 1.8s infinite;
}

@keyframes regLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Scenes stack on top of each other; only .active is visible */
.reg-scenes {
  display: grid;
}

.reg-scene {
  grid-area: 1 / 1;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s;
}

.reg-scene.active {
  opacity: 1;
  visibility: visible;
}

/* Vertical connector that "fills" as steps arrive (start edge = right in RTL) */
.reg-scene::before,
.reg-scene::after {
  content: '';
  position: absolute;
  inset-inline-start: 17px;
  top: 18px;
  bottom: 18px;
  width: 2px;
  border-radius: 2px;
}

.reg-scene::before { background: rgba(148, 163, 184, 0.18); }

.reg-scene::after {
  background: linear-gradient(180deg, #00d4ff, #3b82f6);
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.6s ease;
}

.reg-scene.active.p1::after { transform: scaleY(0.25); }
.reg-scene.active.p2::after { transform: scaleY(0.5); }
.reg-scene.active.p3::after { transform: scaleY(0.75); }
.reg-scene.active.p4::after { transform: scaleY(1); }

/* --- Steps --------------------------------------------------------------- */
.reg-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0.6rem 0.5rem 0.55rem;
  border-radius: 12px;
  border: 1px solid transparent;
  opacity: 0.28;
  transform: translateY(6px);
  filter: saturate(0.4);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.45s ease, background 0.45s ease, border-color 0.45s ease;
}

.reg-step.is-on {
  opacity: 1;
  transform: none;
  filter: none;
}

/* The step that just fired gets highlighted */
.reg-step.is-current {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.28);
}

.reg-step-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.reg-step.is-current .reg-step-icon {
  animation: regIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes regIconPop {
  0%   { transform: scale(0.7); }
  100% { transform: scale(1); }
}

.tone-green  { background: linear-gradient(135deg, #10b981, #059669); }
.tone-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tone-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tone-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tone-cyan   { background: linear-gradient(135deg, #06b6d4, #0284c7); }

.reg-step-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.reg-step-text strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-step-text small {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reg-step-pill {
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.22rem 0.6rem;
  border-radius: 100px;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
}

/* --- Headlines ----------------------------------------------------------- */
.reg-headlines {
  display: grid;
  margin-top: 0.25rem;
}

.reg-headline {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s;
}

.reg-headline.active {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.reg-headline h3 {
  margin: 0 0 0.35rem;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.45;
  color: #ffffff;
}

.reg-headline p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #bae6fd;
}

/* --- Trust footer -------------------------------------------------------- */
.reg-trust {
  position: relative;
  z-index: 2;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.reg-trust-text {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.7;
  color: #cbd5e1;
}

.reg-trust-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.reg-trust-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.reg-trust-chips li svg {
  width: 14px;
  height: 14px;
  color: #5eead4;
}

/* --- Offer banner (form side) ------------------------------------------- */
.reg-offer-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border: 1px dashed #34d399;
}

.reg-offer-icon {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  box-shadow: 0 6px 14px rgba(16, 185, 129, 0.3);
  animation: regGiftWiggle 3.2s ease-in-out 1.2s infinite;
}

@keyframes regGiftWiggle {
  0%, 86%, 100% { transform: rotate(0); }
  89% { transform: rotate(-10deg); }
  92% { transform: rotate(9deg); }
  95% { transform: rotate(-5deg); }
}

.reg-offer-text {
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}

.reg-offer-text strong {
  font-size: 0.88rem;
  font-weight: 800;
  color: #065f46;
}

.reg-offer-text small {
  font-size: 0.74rem;
  color: #475569;
}

/* --- Responsive & motion ------------------------------------------------- */
@media (max-width: 1199.98px) {
  .reg-industry-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .reg-step,
  .reg-scene,
  .reg-scene::after,
  .reg-headline { transition: none; }
  .reg-step { opacity: 1; transform: none; filter: none; }
  .reg-scene.active::after { transform: scaleY(1); }
  .reg-industry-progress,
  .reg-live-dot,
  .reg-offer-icon,
  .reg-step.is-current .reg-step-icon { animation: none !important; }
}

/* Once the visitor picks an industry, auto-rotate stops — hide the timer bar */
.reg-showcase.is-manual .reg-industry-progress { display: none; }

/* --- Compact layout: no empty bands above/below the showcase ------------ */
/* This stylesheet only loads on the register page, so these overrides
   don't touch the login page. */
.auth-visual-panel {
  justify-content: center;
  gap: 1.4rem;
  padding-top: 2.25rem;
  padding-bottom: 2.25rem;
}

.auth-visual-panel > .auth-panel-tag { margin-bottom: 0; }

.reg-showcase {
  flex: 0 0 auto;
  gap: 1.1rem;
}

.reg-trust { margin-top: 0; }

/* Bigger, more readable steps so the card fills the panel */
.reg-live-card { padding: 1.15rem 1.25rem 1.05rem; }
.reg-scene { gap: 0.6rem; }
.reg-step { padding: 0.72rem 0.8rem; gap: 0.85rem; }
.reg-step-icon { flex-basis: 42px; width: 42px; height: 42px; border-radius: 12px; }
.reg-step-icon svg { width: 19px; height: 19px; }
.reg-scene::before,
.reg-scene::after { inset-inline-start: 21px; top: 24px; bottom: 24px; }
.reg-step-text strong { font-size: 0.9rem; }
.reg-step-text small { font-size: 0.76rem; }
.reg-step-pill { font-size: 0.76rem; padding: 0.28rem 0.7rem; }
.reg-industry-tab { padding: 0.7rem 0.5rem; font-size: 0.82rem; }
.reg-headline h3 { font-size: 1.45rem; }
.reg-headline p { font-size: 0.9rem; }

/* --- Fill the full panel height (the form column sets the height) -------- */
.auth-visual-panel { justify-content: space-between; }
.reg-showcase { flex: 1 1 auto; justify-content: space-between; }
.reg-live-card { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.reg-scenes { flex: 1 1 auto; }
.reg-scene { align-content: center; }

/* --- Scene fills the card; result row anchors to the bottom ------------- */
.reg-scene { display: flex; flex-direction: column; }
.reg-scenes { min-height: 0; }
.reg-showcase { justify-content: flex-start; }
.reg-live-card { min-height: 0; }
.reg-scene::before,
.reg-scene::after { bottom: 92px; }

.reg-outcome {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(14, 165, 233, 0.12));
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.reg-outcome-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981, #0ea5e9);
}

.reg-outcome-text {
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
  color: #d1fae5;
}

/* Steps share the remaining card height evenly */
.reg-scene { gap: 0.7rem; }
.reg-step { flex: 1 1 auto; min-height: 0; }

/* Offer banner: blue to match the primary submit button */
.reg-offer-banner {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
  border-color: #38bdf8;
}
.reg-offer-icon {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
}
.reg-offer-text strong { color: #1e3a8a; }

/* Same card size as the login page (desktop). The form scrolls inside
   the card instead of making the card taller. Scoped to the register page. */
@media (min-width: 992px) {
  body:has(#reg-showcase) .auth-split-row { height: 862px; }
  body:has(#reg-showcase) .auth-form-panel {
    justify-content: flex-start;
    overflow-y: auto;
    scrollbar-width: thin;
  }
}

/* Keep the showcase inside the fixed login-height card (desktop only) */
@media (min-width: 992px) {
  body:has(#reg-showcase) .auth-visual-panel { min-height: 0; overflow: hidden; }
  body:has(#reg-showcase) .reg-step { flex: 0 0 auto; padding: 0.55rem 0.7rem; }
  body:has(#reg-showcase) .reg-step-icon { flex-basis: 38px; width: 38px; height: 38px; }
  body:has(#reg-showcase) .reg-scene { gap: 0.5rem; }
  body:has(#reg-showcase) .reg-live-card { padding: 1rem 1.1rem 0.95rem; }
  body:has(#reg-showcase) .reg-showcase { gap: 0.8rem; }
}

@media (min-width: 992px) {
  body:has(#reg-showcase) .auth-form-panel { min-height: 0; }
}

@media (min-width: 992px) {
  body:has(#reg-showcase) .auth-split-row { flex-wrap: nowrap; }
}
