/**
 * 5MinHelp — Worker Registration CSS
 * worker-registration.css — Premium multi-step registration form styles.
 */

/* ── Step Progress Bar ──────────────────────────────────────────── */
.reg-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 auto 40px;
  max-width: 520px;
  position: relative;
}

.reg-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  z-index: 1;
}

.reg-step-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-muted);
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  z-index: 2;
}

.reg-step.active .reg-step-bubble {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
  box-shadow: 0 0 20px rgba(99,102,241,0.5);
  transform: scale(1.15);
}

.reg-step.done .reg-step-bubble {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
}

.reg-step-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 6px;
  text-align: center;
  white-space: nowrap;
  transition: color 0.3s;
}

.reg-step.active .reg-step-label { color: var(--accent-primary); }
.reg-step.done .reg-step-label   { color: #10b981; }

.reg-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin-top: -22px;
  z-index: 0;
  transition: background 0.4s;
}

.reg-step-line.done { background: #10b981; }

/* ── Form Steps ─────────────────────────────────────────────────── */
.reg-step-panel {
  display: none;
  animation: stepIn 0.35s ease;
}

.reg-step-panel.active {
  display: block;
}

@keyframes stepIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section Title ──────────────────────────────────────────────── */
.reg-section-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reg-section-title span.step-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(99,102,241,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

/* ── Grid helpers ───────────────────────────────────────────────── */
.reg-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.reg-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

.reg-col-full { grid-column: 1 / -1; }

@media (max-width: 640px) {
  .reg-grid-2,
  .reg-grid-3 { grid-template-columns: 1fr; }
  .reg-col-full { grid-column: 1; }
}

/* ── Form Row ───────────────────────────────────────────────────── */
.reg-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reg-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.reg-label .req { color: #f97316; margin-left: 2px; }

.reg-input,
.reg-select,
.reg-textarea {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
  box-sizing: border-box;
  -webkit-appearance: none;
}

.reg-input:focus,
.reg-select:focus,
.reg-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  background: rgba(99,102,241,0.06);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

.reg-input.error,
.reg-select.error,
.reg-textarea.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.12);
}

.reg-input::placeholder,
.reg-textarea::placeholder { color: var(--text-muted); }

.reg-select option { background: #1a1d2e; color: #fff; }

.reg-textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.reg-error-msg {
  font-size: 12px;
  color: #ef4444;
  margin-top: 2px;
  display: none;
}

.reg-error-msg.show { display: block; }

/* ── Password wrapper ───────────────────────────────────────────── */
.reg-pw-wrapper {
  position: relative;
}

.reg-pw-wrapper .reg-input { padding-right: 48px; }

.reg-pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  padding: 4px;
  transition: color 0.2s;
}

.reg-pw-toggle:hover { color: var(--text-primary); }

/* ── Static badge (State / Country) ────────────────────────────── */
.reg-static-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  background: rgba(255,255,255,0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
}

.reg-static-badge .badge-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.reg-static-badge .badge-value {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 600;
}

/* ── File Upload ────────────────────────────────────────────────── */
.reg-upload-zone {
  border: 2px dashed var(--border-subtle);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: rgba(255,255,255,0.02);
  position: relative;
}

.reg-upload-zone:hover,
.reg-upload-zone.drag-over {
  border-color: var(--accent-primary);
  background: rgba(99,102,241,0.06);
}

.reg-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.reg-upload-icon { font-size: 32px; margin-bottom: 8px; }

.reg-upload-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.reg-upload-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.reg-upload-preview {
  margin-top: 12px;
  position: relative;
  display: inline-block;
}

.reg-upload-preview img {
  width: 80px;
  height: 80px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid var(--accent-primary);
}

.reg-upload-preview.avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.reg-upload-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.reg-upload-progress {
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
  display: none;
}

.reg-upload-progress.show { display: block; }

.reg-upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), #06b6d4);
  border-radius: 2px;
  width: 0;
  transition: width 0.3s;
}

/* ── Hint text ──────────────────────────────────────────────────── */
.reg-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ── Navigation buttons ─────────────────────────────────────────── */
.reg-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  align-items: center;
}

.reg-btn-back {
  padding: 14px 24px;
  border-radius: 12px;
  border: 1.5px solid var(--border-subtle);
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.reg-btn-back:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.reg-btn-next {
  flex: 1;
  padding: 15px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.reg-btn-next:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 8px 24px rgba(99,102,241,0.35); }
.reg-btn-next:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.reg-btn-next .btn-spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.reg-btn-next.loading .btn-text { display: none; }
.reg-btn-next.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Review card ────────────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}

@media (max-width: 600px) { .review-grid { grid-template-columns: 1fr; } }

.review-item { border-bottom: 1px solid rgba(255,255,255,0.06); padding-bottom: 10px; }
.review-item-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.review-item-value { font-size: 14px; color: var(--text-primary); font-weight: 500; word-break: break-all; }

.review-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  margin-bottom: 12px;
}

/* ── Alert box ──────────────────────────────────────────────────── */
.reg-alert {
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
  display: none;
}

.reg-alert.show { display: flex; }

.reg-alert.error   { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.3);  color: #fca5a5; }
.reg-alert.success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }
.reg-alert.info    { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3); color: #a5b4fc; }

.reg-alert-icon { font-size: 18px; flex-shrink: 0; }

/* ── Success screen ─────────────────────────────────────────────── */
.reg-success-screen {
  display: none;
  text-align: center;
  padding: 48px 24px;
}

.reg-success-screen.show { display: block; }

.reg-success-icon {
  font-size: 72px;
  margin-bottom: 24px;
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.reg-success-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.reg-success-body {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 32px;
}

/* ── Photo preview (avatar center) ─────────────────────────────── */
.reg-avatar-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.reg-avatar-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-primary);
  background: rgba(255,255,255,0.05);
  display: none;
}

.reg-avatar-placeholder {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(99,102,241,0.1);
  border: 2px dashed rgba(99,102,241,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: rgba(99,102,241,0.5);
}

/* ── Optional badge ─────────────────────────────────────────────── */
.opt-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── UPI / Bank details block ───────────────────────────────────── */
.reg-upi-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 12px;
  margin-bottom: 20px;
}

.reg-upi-icon { font-size: 28px; }
.reg-upi-text { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.reg-upi-text strong { color: #34d399; }

/* ── Char counter ───────────────────────────────────────────────── */
.reg-char-count {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

/* ── Info tooltip ───────────────────────────────────────────────── */
.reg-field-info {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

/* ── Form wrapper ───────────────────────────────────────────────── */
.reg-form-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 36px;
  backdrop-filter: blur(12px);
}

@media (max-width: 640px) {
  .reg-form-card { padding: 24px 16px; }
  .reg-section-title { font-size: 16px; }
}

/* ── Global override — match form-input aesthetics ──────────────── */
.reg-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23888'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
