/* ═══════════════════════════════════════════════
   REGISTER.CSS  —  Tadbir International Think Tank
   Researcher Registration Wizard Styles
   ═══════════════════════════════════════════════ */

/* ── Hero ─────────────────────────────────────── */
.reg-hero {
  background: var(--primary);
  padding: 140px 0 72px;
  position: relative;
  overflow: hidden;
}
.reg-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(200,160,70,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,160,70,.06) 1px, transparent 1px);
  background-size: 56px 56px;
}
.reg-hero-glow {
  position: absolute;
  width: 700px; height: 700px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,160,70,.12) 0%, transparent 65%);
  top: -250px; left: -150px; pointer-events: none;
}
.reg-hero-content {
  position: relative; z-index: 1;
}
.reg-hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 14px;
}
.reg-hero-content p {
  font-size: 1.05rem; color: rgba(255,255,255,.65);
  max-width: 580px; line-height: 1.9;
}

/* ── Wizard Section ───────────────────────────── */
.wizard-section {
  padding: 56px 0 96px;
  background: var(--bg);
  min-height: 80vh;
}

/* ── Step Rail ────────────────────────────────── */
.step-rail {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  margin-bottom: 32px;
  padding: 0 8px;
  overflow-x: auto;
  gap: 0;
}
.step-rail::-webkit-scrollbar { height: 4px; }
.step-rail::-webkit-scrollbar-track { background: transparent; }
.step-rail::-webkit-scrollbar-thumb { background: rgba(10,37,64,.2); border-radius: 4px; }

.step-rail-line {
  position: absolute;
  top: 22px; right: 8px; left: 8px;
  height: 2px;
  background: rgba(10,37,64,.1);
  z-index: 0;
  border-radius: 2px;
}
.step-rail-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
  border-radius: 2px;
  transition: width .45s cubic-bezier(.4,0,.2,1);
}

.step-node {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  background: none; border: none; cursor: pointer;
  position: relative; z-index: 1; padding: 0 4px;
  flex: 1; min-width: 64px;
}
.step-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  background: var(--white);
  border: 2px solid rgba(10,37,64,.14);
  box-shadow: 0 2px 8px rgba(10,37,64,.07);
  transition: var(--transition);
  flex-shrink: 0;
}
.step-label {
  font-size: .72rem; color: var(--text-muted);
  font-family: inherit; transition: var(--transition);
  white-space: nowrap;
}

.step-node.active .step-icon,
.step-node.done .step-icon {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 4px 16px rgba(200,160,70,.35);
}
.step-node.active .step-label { color: var(--secondary); font-weight: 700; }
.step-node.done .step-icon { background: var(--primary); border-color: var(--primary); }
.step-node.done .step-label { color: var(--primary); }

/* ── Step Counter ─────────────────────────────── */
.step-counter {
  text-align: center; margin-bottom: 20px;
  font-size: .85rem; color: var(--text-muted);
}
.step-counter #step-current {
  font-size: 1.4rem; font-weight: 700; color: var(--secondary);
}
.step-counter-label {
  margin-right: 12px; font-weight: 700; color: var(--primary); font-size: .9rem;
}

/* ── Wizard Card ──────────────────────────────── */
.wizard-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* ── Step Panel ───────────────────────────────── */
.wizard-step { display: none; padding: 40px 40px 8px; animation: fadeSlide .35s ease; }
.wizard-step.active { display: block; }

@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: none; }
}

/* ── Step Heading ─────────────────────────────── */
.step-heading {
  display: flex; align-items: flex-start; gap: 18px; margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.step-heading-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(200,160,70,.12), rgba(200,160,70,.06));
  border: 1px solid rgba(200,160,70,.25);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
}
.step-heading h2 { font-size: 1.45rem; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.step-heading p  { color: var(--text-light); font-size: .9rem; }

/* ── Form Grid ────────────────────────────────── */
.form-grid {
  display: grid; gap: 20px;
}
.form-grid.col-1 { grid-template-columns: 1fr; }
.form-grid.col-2 { grid-template-columns: 1fr 1fr; }
.form-grid .col-2 { grid-column: span 2; }

/* ── Field ────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: .85rem; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 6px;
}
.field-icon { font-size: .85rem; opacity: .6; }
.opt { font-weight: 400; color: var(--text-muted); font-size: .78rem; }
.field.required label::after {
  content: '*'; color: #dc2626; font-size: .75rem; margin-right: 2px;
}
.field input,
.field select,
.field textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: inherit; font-size: .9rem; color: var(--text);
  background: var(--bg);
  transition: var(--transition);
  direction: rtl;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--secondary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(200,160,70,.12);
}
.field input.ltr-input,
.field textarea.ltr-input { direction: ltr; }
.field textarea { resize: vertical; min-height: 90px; }
.field select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 36px; }

/* Radio group */
.radio-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.radio-item {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; font-size: .88rem; color: var(--text);
  padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: var(--transition); background: var(--bg);
}
.radio-item input { accent-color: var(--secondary); }
.radio-item:has(input:checked) {
  border-color: var(--secondary); background: rgba(200,160,70,.06); color: var(--primary);
}

/* Range slider */
.range-wrap { display: flex; flex-direction: column; gap: 10px; }
.range-wrap input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px;
  background: linear-gradient(to left, rgba(10,37,64,.1) 0%, rgba(10,37,64,.1) 100%);
  border-radius: 4px; outline: none; border: none; padding: 0; cursor: pointer;
  background: var(--border);
}
.range-wrap input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--secondary); border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(200,160,70,.4); cursor: pointer; transition: var(--transition);
}
.range-wrap input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.15); }
.range-labels { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-muted); }
.range-current { font-weight: 700; color: var(--secondary); font-size: .88rem; }

/* char count */
.char-count { font-size: .75rem; color: var(--text-muted); font-weight: 400; margin-right: auto; }

/* ── Avatar Upload ─────────────────────────────── */
.avatar-upload-area {
  display: flex; align-items: center; gap: 20px;
  padding: 20px; border: 2px dashed rgba(200,160,70,.3);
  border-radius: var(--radius); margin-bottom: 28px; cursor: pointer;
  transition: var(--transition); background: rgba(200,160,70,.03);
}
.avatar-upload-area:hover {
  border-color: var(--secondary);
  background: rgba(200,160,70,.06);
}
.avatar-preview {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, rgba(200,160,70,.15), rgba(200,160,70,.05));
  border: 2px solid rgba(200,160,70,.25);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-meta { display: flex; flex-direction: column; gap: 6px; }
.avatar-label { font-weight: 700; color: var(--primary); font-size: .9rem; }
.avatar-hint  { font-size: .78rem; color: var(--text-muted); }
.avatar-btn {
  display: inline-block; background: var(--primary); color: var(--white);
  padding: 6px 14px; border-radius: var(--radius-sm); font-size: .8rem; margin-top: 4px;
  width: fit-content;
}

/* ── Specialty Grid ───────────────────────────── */
.specialty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.specialty-card { cursor: pointer; }
.specialty-card input { display: none; }
.spec-inner {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 20px 12px; text-align: center;
  border: 2px solid var(--border); border-radius: var(--radius);
  background: var(--bg); transition: var(--transition);
}
.spec-inner:hover { border-color: rgba(200,160,70,.4); background: rgba(200,160,70,.04); }
.specialty-card input:checked + .spec-inner {
  border-color: var(--secondary);
  background: rgba(200,160,70,.08);
  box-shadow: 0 4px 16px rgba(200,160,70,.2);
}
.spec-icon  { font-size: 1.8rem; }
.spec-label { font-size: .84rem; font-weight: 700; color: var(--primary); }

/* ── Tag Input ────────────────────────────────── */
.tag-input-wrap {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; display: flex; flex-wrap: wrap; gap: 6px;
  background: var(--bg); min-height: 48px; cursor: text;
  transition: var(--transition);
}
.tag-input-wrap:focus-within {
  border-color: var(--secondary); background: var(--white);
  box-shadow: 0 0 0 3px rgba(200,160,70,.12);
}
.tag-input-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-input-wrap input {
  border: none; background: none; outline: none;
  font-family: inherit; font-size: .88rem; color: var(--text);
  min-width: 120px; flex: 1; padding: 2px 4px;
  box-shadow: none !important;
}
.input-tag {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(10,37,64,.08); color: var(--primary);
  border: 1px solid rgba(10,37,64,.15);
  padding: 3px 10px; border-radius: 100px; font-size: .8rem;
}
.input-tag-remove {
  cursor: pointer; color: var(--text-muted); line-height: 1;
  font-size: .9rem; transition: var(--transition);
}
.input-tag-remove:hover { color: #dc2626; }
.quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-tag {
  padding: 3px 12px; border: 1px solid rgba(200,160,70,.35);
  border-radius: 100px; font-size: .76rem; color: #a07830;
  background: rgba(200,160,70,.06); cursor: pointer; transition: var(--transition);
}
.quick-tag:hover { background: rgba(200,160,70,.14); }

/* ── Collab Grid ──────────────────────────────── */
.collab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.collab-card { cursor: pointer; }
.collab-card input { display: none; }
.collab-inner {
  display: flex; flex-direction: column; gap: 8px;
  padding: 22px 18px; border: 2px solid var(--border);
  border-radius: var(--radius); background: var(--bg);
  transition: var(--transition); height: 100%;
}
.collab-inner:hover { border-color: rgba(200,160,70,.4); background: rgba(200,160,70,.04); }
.collab-card input:checked + .collab-inner {
  border-color: var(--secondary);
  background: rgba(200,160,70,.07);
  box-shadow: 0 4px 18px rgba(200,160,70,.2);
}
.collab-icon  { font-size: 1.7rem; }
.collab-title { font-size: .92rem; font-weight: 700; color: var(--primary); }
.collab-desc  { font-size: .8rem; color: var(--text-light); line-height: 1.6; }

/* ── Upload Zone ──────────────────────────────── */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.upload-zone {
  border: 2px dashed rgba(10,37,64,.18); border-radius: var(--radius);
  padding: 40px 24px; text-align: center; cursor: pointer;
  background: var(--bg); transition: var(--transition);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--secondary); background: rgba(200,160,70,.05);
}
.upload-zone.has-file {
  border-color: var(--accent); border-style: solid;
  background: rgba(58,180,166,.04);
}
.upload-icon  { font-size: 2.5rem; opacity: .55; }
.upload-title { font-weight: 700; color: var(--primary); font-size: .92rem; }
.upload-hint  { font-size: .78rem; color: var(--text-muted); }
.upload-btn {
  background: var(--primary); color: var(--white);
  padding: 8px 20px; border-radius: var(--radius-sm); font-size: .82rem;
  margin-top: 6px; transition: var(--transition);
}
.upload-zone:hover .upload-btn { background: var(--primary-light); }
.upload-filename {
  font-size: .8rem; color: var(--accent); font-weight: 700; min-height: 18px;
}

/* ── Summary Box ──────────────────────────────── */
.summary-box {
  border: 1px solid rgba(200,160,70,.28); border-radius: var(--radius);
  overflow: hidden;
}
.summary-header {
  background: rgba(200,160,70,.08); padding: 14px 18px;
  font-weight: 700; color: var(--primary); font-size: .9rem;
  display: flex; align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(200,160,70,.2);
}
.summary-body { padding: 18px; }
.summary-hint { color: var(--text-muted); font-size: .85rem; font-style: italic; }
.summary-row  { display: flex; gap: 10px; font-size: .84rem; margin-bottom: 6px; }
.summary-row .s-label { color: var(--text-muted); min-width: 130px; flex-shrink: 0; }
.summary-row .s-val   { color: var(--primary); font-weight: 700; }

/* ── Terms ────────────────────────────────────── */
.terms-check {
  display: flex; align-items: flex-start; gap: 10px; cursor: pointer;
  font-size: .88rem; color: var(--text); line-height: 1.7;
}
.terms-check input { margin-top: 4px; accent-color: var(--secondary); flex-shrink: 0; }
.terms-link { color: var(--secondary); font-weight: 700; }
.terms-link:hover { text-decoration: underline; }

/* ── Wizard Nav ───────────────────────────────── */
.wizard-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 40px; border-top: 1px solid var(--border);
  background: rgba(248,249,250,.7);
}
.wizard-dots { display: flex; gap: 6px; }
.w-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(10,37,64,.15); transition: var(--transition);
}
.w-dot.active { background: var(--secondary); width: 22px; border-radius: 4px; }
.w-dot.done   { background: var(--primary); }

/* ── Success Screen ───────────────────────────── */
.success-screen {
  display: none; text-align: center; padding: 72px 24px;
  animation: fadeSlide .5s ease;
}
.success-screen.show { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.success-icon { font-size: 4rem; animation: pop .5s cubic-bezier(.175,.885,.32,1.275) .1s both; }
@keyframes pop { from { transform: scale(.5); opacity:0 } to { transform: scale(1); opacity:1 } }
.success-screen h2 { font-size: 2rem; font-weight: 700; color: var(--primary); }
.success-screen p  { color: var(--text-light); max-width: 440px; font-size: .95rem; }
.success-code {
  background: rgba(200,160,70,.08); border: 1px solid rgba(200,160,70,.25);
  color: var(--primary); padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: .9rem;
}
.success-code strong { color: var(--secondary); font-size: 1.1rem; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .wizard-step { padding: 28px 20px 8px; }
  .wizard-nav  { padding: 18px 20px; }
  .form-grid.col-2 { grid-template-columns: 1fr; }
  .form-grid .col-2 { grid-column: span 1; }
  .upload-grid { grid-template-columns: 1fr; }
  .step-label { font-size: .65rem; }
}
@media (max-width: 640px) {
  .specialty-grid { grid-template-columns: repeat(2, 1fr); }
  .collab-grid    { grid-template-columns: 1fr; }
  .step-rail { gap: 0; }
  .step-icon { width: 36px; height: 36px; font-size: .9rem; }
  .avatar-upload-area { flex-direction: column; text-align: center; }
  .avatar-meta { align-items: center; }
}
