/* ============================================================
   HUMSAFAR REGISTRATION WIDGET
   Uses CSS custom properties for easy theme overriding.
   ============================================================ */

.humsafar-reg-widget {
  --hreg-accent: #7c3aed;
  --hreg-accent-hover: #6d28d9;
  --hreg-bg: #ffffff;
  --hreg-border: #e5e7eb;
  --hreg-text: #1f2937;
  --hreg-muted: #6b7280;
  --hreg-selected-bg: #f5f3ff;
  --hreg-selected-border: #7c3aed;
  --hreg-radius: 12px;
  --hreg-input-radius: 8px;

  background: var(--hreg-bg);
  border-radius: var(--hreg-radius);
  padding: 2rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
  box-sizing: border-box;
}

.humsafar-reg-widget__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hreg-text);
  margin: 0 0 0.5rem 0;
  text-align: center;
}

.humsafar-reg-widget__subtitle {
  font-size: 0.9rem;
  color: var(--hreg-muted);
  text-align: center;
  margin: 0 0 1.5rem 0;
}

/* Gender row */
.humsafar-reg-widget__gender-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.humsafar-reg-widget__gender-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.humsafar-reg-widget__gender-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--hreg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.25rem 0;
}

/* Radio option buttons */
.humsafar-reg-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border: 2px solid var(--hreg-border);
  border-radius: var(--hreg-input-radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.95rem;
  color: var(--hreg-text);
  user-select: none;
}

.humsafar-reg-option:hover {
  border-color: var(--hreg-accent);
}

.humsafar-reg-option.is-selected {
  border-color: var(--hreg-accent);
  background: var(--hreg-selected-bg);
  font-weight: 600;
  color: var(--hreg-accent);
}

.humsafar-reg-option input[type="radio"] {
  accent-color: var(--hreg-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Slide-down fields */
.humsafar-reg-widget__fields {
  display: none;
}

.humsafar-reg-widget__field {
  margin-bottom: 0.75rem;
}

.humsafar-reg-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--hreg-border);
  border-radius: var(--hreg-input-radius);
  font-size: 1rem;
  color: var(--hreg-text);
  box-sizing: border-box;
  transition: border-color 0.15s;
  outline: none;
}

.humsafar-reg-input:focus {
  border-color: var(--hreg-accent);
}

/* Submit button */
.humsafar-reg-widget__submit {
  width: 100%;
  padding: 0.9rem;
  background: var(--hreg-accent);
  color: #fff;
  border: none;
  border-radius: var(--hreg-input-radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 0.25rem;
  transition: background 0.15s;
  letter-spacing: 0.02em;
}

.humsafar-reg-widget__submit:hover {
  background: var(--hreg-accent-hover);
}

.humsafar-reg-widget__submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Terms */
.humsafar-reg-widget__terms {
  font-size: 0.75rem;
  color: var(--hreg-muted);
  text-align: center;
  margin-top: 0.75rem;
  line-height: 1.5;
}

.humsafar-reg-widget__terms a {
  color: var(--hreg-accent);
}

/* Status messages */
.humsafar-reg-widget__status {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em;
}

.humsafar-reg-widget__status--error {
  color: #dc2626;
}

.humsafar-reg-widget__status--success {
  color: #16a34a;
  font-weight: 600;
}

.humsafar-reg-widget__status--loading {
  color: var(--hreg-muted);
}
