/**
 * Signup-pagina: grijze achtergrond, gecentreerde witte kaart.
 */

.rb-page-signup {
  background: #F3F3F3;
  min-height: 100vh;
}

.rb-signup-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--rb-space-12) var(--rb-space-4);
  min-height: calc(100vh - 5rem);
}

/* Custom premium wizard-style stepped progress bar */
.rb-signup-main .rb-progress-wrap {
  width: 100%;
  max-width: 600px;
  /* Wider to accommodate labels beautifully */
  margin-bottom: var(--rb-space-10);
  position: relative;
}

.rb-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

/* Background grey connector line */
.rb-steps::before {
  content: '';
  position: absolute;
  top: 16px;
  /* vertically centered with the 32px circle */
  left: 45px;
  /* Starts exactly at the center of circle 1 */
  right: 45px;
  /* Ends exactly at the center of circle 5 */
  height: 3px;
  background: #E2E8F0;
  /* Slate 200 */
  z-index: 1;
  border-radius: 999px;
}

/* Blue completed progress connector line */
.rb-steps::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 45px;
  /* Starts exactly at the center of circle 1 */
  width: calc(100% - 90px);
  /* Total distance between circle 1 and circle 5 centers */
  height: 3px;
  background: #2563EB;
  /* Brand Blue */
  z-index: 2;
  border-radius: 999px;
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scale-based progress mapping */
.rb-steps.step-1::after {
  transform: scaleX(0);
}

.rb-steps.step-2::after {
  transform: scaleX(0.25);
}

.rb-steps.step-3::after {
  transform: scaleX(0.5);
}

.rb-steps.step-4::after {
  transform: scaleX(0.75);
}

.rb-steps.step-5::after {
  transform: scaleX(1);
}

.rb-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 3;
  width: 90px;
  /* Uniform width so labels align perfectly */
}

/* Step icon circle */
.rb-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid #CBD5E1;
  /* Slate border for future steps */
  color: #64748B;
  /* Slate grey text */
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Step label below */
.rb-step-label {
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  /* Muted slate for future steps */
  text-align: center;
  white-space: nowrap;
  transition: all 0.25s ease;
}

/* Small caret arrow pointing down above the active step icon - clean grey 'v' chevron */
.rb-step.active::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 6px;
  height: 6px;
  border-right: 2px solid #94A3B8;
  /* Slate grey chevron */
  border-bottom: 2px solid #94A3B8;
}

/* Active Step State */
.rb-step.active .rb-step-icon {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  box-shadow: none;
  /* Removed the larger, lighter halo outer circle */
}

.rb-step.active .rb-step-label {
  color: #1E293B;
  /* Dark slate text for active label */
  font-weight: 700;
}

/* Completed Step State */
.rb-step.completed .rb-step-icon {
  background: #2563EB;
  border-color: #2563EB;
  color: #FFFFFF;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.rb-step.completed .rb-step-label {
  color: #2563EB;
  /* Blue text for completed label */
}

/* Openingstijden-tabel (stap 3) */
.rb-opening-grid {
  width: 100%;
  border-collapse: collapse;
  margin: var(--rb-space-6) 0;
}

.rb-opening-grid th {
  text-align: left;
  font-size: var(--rb-text-small);
  font-weight: 500;
  color: var(--rb-text-muted);
  padding: var(--rb-space-2) var(--rb-space-4) var(--rb-space-2) 0;
}

.rb-opening-grid th:last-child {
  padding-left: var(--rb-space-6);
}

.rb-opening-grid td {
  padding: var(--rb-space-3) var(--rb-space-4) var(--rb-space-3) 0;
  vertical-align: middle;
}

.rb-opening-grid td:last-child {
  padding-left: var(--rb-space-6);
}

.rb-opening-grid .rb-day-name {
  font-size: var(--rb-text-body);
  color: var(--rb-text);
}

.rb-opening-grid input[type="time"] {
  font-family: var(--rb-font-sans);
  font-size: var(--rb-text-body);
  padding: var(--rb-space-2) var(--rb-space-3);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-btn);
  background: var(--rb-bg);
  color: var(--rb-text);
}

.rb-opening-grid input[type="time"]:disabled {
  background: #F3F4F6;
  color: var(--rb-text-muted);
  border-color: var(--rb-border);
}

/* Vierkantje aan/uit per dag (open = aangevinkt, dicht = uit) */
.rb-opening-grid .rb-check-wrap {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.rb-opening-grid .rb-check-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rb-opening-grid .rb-checkbox {
  position: relative;
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--rb-border);
  border-radius: 4px;
  background: var(--rb-bg);
  transition: background 0.15s, border-color 0.15s;
}

.rb-opening-grid .rb-check-wrap input:checked+.rb-checkbox {
  background: var(--rb-primary);
  border-color: var(--rb-primary);
}

.rb-opening-grid .rb-check-wrap input:checked+.rb-checkbox::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.35rem;
  height: 0.6rem;
  margin-left: -0.175rem;
  margin-top: -0.3rem;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.rb-opening-grid .rb-check-wrap input:focus-visible+.rb-checkbox {
  outline: 2px solid var(--rb-primary);
  outline-offset: 2px;
}

.rb-opening-grid .rb-time-range {
  display: flex;
  align-items: center;
  gap: var(--rb-space-2);
}

.rb-opening-grid .rb-time-range span {
  color: var(--rb-text-muted);
  font-size: var(--rb-text-small);
}

.rb-form-card.rb-form-card--wide {
  max-width: 520px;
}

.rb-form-error {
  color: #DC2626;
  font-size: var(--rb-text-small);
  margin: 0 0 var(--rb-space-4);
}

.rb-form-error[hidden] {
  display: none;
}

/* CAO-type select (stap 2) */
.rb-cao-modal-select-row {
  padding: var(--rb-space-4) var(--rb-space-5);
  background: #F8FAFC;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-btn);
  margin-bottom: var(--rb-space-4);
}

.rb-cao-modal-field {
  display: flex;
  flex-direction: column;
  gap: var(--rb-space-3);
}

.rb-cao-field-header {
  display: flex;
  flex-direction: column;
  gap: var(--rb-space-1);
}

.rb-cao-modal-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rb-text-muted);
}

.rb-cao-field-desc {
  font-size: 0.8rem;
  color: var(--rb-text-muted);
  margin: 0;
  line-height: 1.4;
}

.rb-cao-modal-select {
  width: 100%;
  padding: 0.5rem var(--rb-space-4);
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-btn);
  background: var(--rb-bg);
  color: var(--rb-text);
  font-size: var(--rb-text-body);
  font-family: var(--rb-font-sans);
  cursor: pointer;
  transition: border-color 0.15s;
}

.rb-cao-modal-select:hover {
  border-color: #DDE3EB;
}

.rb-cao-modal-select:focus {
  outline: none;
  border-color: var(--rb-primary);
  box-shadow: 0 0 0 3px var(--rb-primary-ring);
}

/* Analytics consent checkbox (optional, not pre-checked) */
.rb-consent-field {
  margin-top: var(--rb-space-2);
}

.rb-consent-label {
  display: flex;
  align-items: flex-start;
  gap: var(--rb-space-2);
  font-size: 0.75rem;
  color: var(--rb-text-muted);
  cursor: pointer;
  line-height: 1.4;
  font-weight: 400;
}

.rb-consent-label input[type="checkbox"] {
  margin-top: 2px;
  width: 0.9rem;
  height: 0.9rem;
  accent-color: var(--rb-primary);
  flex-shrink: 0;
}

.rb-consent-hint {
  margin-top: 4px;
  margin-left: calc(0.9rem + var(--rb-space-2));
  font-size: 0.7rem;
  color: #94A3B8;
  line-height: 1.35;
}

/* Custom color picker (eigen kleur) bij vaardigheden */
.rb-color-custom-wrap {
  display: flex;
  align-items: center;
  gap: var(--rb-space-3);
  margin-top: var(--rb-space-3);
}

.rb-color-custom-label {
  font-size: var(--rb-text-small);
  font-weight: 500;
  color: var(--rb-text-muted);
}

.rb-color-picker-custom {
  width: 32px;
  height: 32px;
  padding: 2px;
  border: 1px solid var(--rb-border);
  border-radius: var(--rb-radius-btn);
  cursor: pointer;
  background: var(--rb-bg);
}

.rb-color-picker-custom:hover {
  border-color: var(--rb-primary);
}

/* Mobiel: signup */
@media (max-width: 768px) {
  .rb-signup-main {
    padding: var(--rb-space-8) max(var(--rb-space-4), env(safe-area-inset-left)) var(--rb-space-8) max(var(--rb-space-4), env(safe-area-inset-right));
    min-height: calc(100vh - 4.5rem);
  }

  .rb-signup-main .rb-progress-wrap {
    max-width: 100%;
    padding: 0 var(--rb-space-2);
  }

  .rb-form-card.rb-form-card--wide {
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
}

@media (max-width: 480px) {
  .rb-opening-grid {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.rb-password-validation {
  list-style: none;
  padding: 12px 14px;
  margin: var(--rb-space-2) 0 var(--rb-space-5) 0;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
}

.rb-password-validation li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.725rem;
  font-weight: 500;
  color: #64748B;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.2;
}

.rb-password-validation li::before {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.rb-password-validation li.invalid {
  color: #64748B;
}

.rb-password-validation li.invalid::before {
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
}

.rb-password-validation li.valid {
  color: #334155;
}

.rb-password-validation li.valid::before {
  content: '✓';
  border: none;
  background: #10B981;
  color: #FFFFFF;
  font-size: 9px;
  font-weight: 900;
}

/* Spinner & Status styles on input fields (Email validation UX) */
.rb-input-relative {
  position: relative;
  width: 100%;
}

.rb-field-spinner {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: rb-spin 0.6s linear infinite;
  pointer-events: none;
  transition: opacity 0.15s ease;
  box-sizing: border-box;
}

@keyframes rb-spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }

  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

#email-status-msg {
  padding: 12px 14px;
  margin: var(--rb-space-2) 0 var(--rb-space-4) 0;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.725rem;
  font-weight: 500;
  color: #334155;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

#email-status-msg::before {
  content: '';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-sizing: border-box;
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 900;
  color: #FFFFFF;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#email-status-msg.idle {
  color: #64748B;
}

#email-status-msg.idle::before {
  border: 1.5px solid #CBD5E1;
  background: #FFFFFF;
  content: '';
}

@keyframes rb-spin-icon {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#email-status-msg.checking::before {
  content: '';
  background: transparent !important;
  border: 2px solid #cbd5e1 !important;
  border-top-color: #3b82f6 !important;
  animation: rb-spin-icon 0.6s linear infinite;
}

#email-status-msg.success::before {
  content: '✓';
  background: #10B981;
}

#email-status-msg.error::before {
  content: '✗';
  background: #EF4444;
}
