/* ── Submit / Submission Form CSS ────────────────────────────────────
   Extends app.css design tokens. Dark-mode form for specialist sign-up.
   ─────────────────────────────────────────────────────────────────── */

/* ── PAGE LAYOUT ─────────────────────────────────────────────────── */
.submit-page {
  min-height: calc(100vh - 65px);
  padding: 48px 24px 80px;
}

.submit-inner {
  max-width: 760px;
  margin: 0 auto;
}

/* ── PAGE HEADER ──────────────────────────────────────────────────── */
.submit-header {
  text-align: center;
  margin-bottom: 40px;
}

.submit-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid var(--border-accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.submit-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
}

.submit-title .accent { color: var(--accent); }

.submit-subtitle {
  color: var(--fg-muted);
  font-size: 1.05rem;
  max-width: 540px;
  margin: 0 auto;
}

/* ── ERROR BANNER ─────────────────────────────────────────────────── */
.submit-errors {
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 80, 80, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 28px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.error-icon {
  font-size: 1.1rem;
  color: #ff6060;
  flex-shrink: 0;
  margin-top: 1px;
}

.submit-errors ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.submit-errors li {
  color: #ff9090;
  font-size: 0.9rem;
  line-height: 1.5;
}

.submit-errors li + li { margin-top: 4px; }

/* ── FORM SECTIONS ────────────────────────────────────────────────── */
.submit-form { display: flex; flex-direction: column; gap: 0; }

.form-section {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--fg);
}

.section-title .req { color: var(--accent); }
.section-title .optional { color: var(--fg-muted); font-size: 0.85rem; font-weight: 400; }

.section-hint {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: -12px;
  margin-bottom: 20px;
}

/* ── FIELDS ───────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.field-row:last-child { margin-bottom: 0; }
.field:last-child { margin-bottom: 0; }

.field + .field { margin-top: 16px; }

.field-label {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg);
}

.field-label .req { color: var(--accent); margin-left: 2px; }
.field-label .optional { color: var(--fg-muted); font-weight: 400; }

.field-input,
.field-textarea,
.field-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.field-input::placeholder,
.field-textarea::placeholder { color: var(--fg-muted); }

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-select {
  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 fill='%238a8a9a' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.field-select option { background: var(--bg-card); }

.field-textarea { resize: vertical; min-height: 100px; }

.field-hint {
  color: var(--fg-muted);
  font-size: 0.8rem;
}

/* ── HONEYPOT ─────────────────────────────────────────────────────── */
.hp-trap {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

/* ── SPECIALIST TYPE CARDS ────────────────────────────────────────── */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  gap: 4px;
  user-select: none;
}

.type-card input { position: absolute; opacity: 0; width: 0; height: 0; }

.type-card:hover {
  border-color: rgba(0, 230, 138, 0.35);
  background: rgba(0, 230, 138, 0.04);
  transform: translateY(-1px);
}

.type-card.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.type-card-icon { font-size: 1.5rem; line-height: 1; }
.type-card-label { font-weight: 600; font-size: 0.88rem; color: var(--fg); margin-top: 4px; }
.type-card-desc { font-size: 0.76rem; color: var(--fg-muted); line-height: 1.3; }

/* ── CHECKBOX GRID (industries) ───────────────────────────────────── */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--fg-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  user-select: none;
}

.checkbox-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.checkbox-chip:hover {
  border-color: rgba(0, 230, 138, 0.35);
  color: var(--fg);
}

.checkbox-chip.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
}

/* ── AGENT STACK SECTION ──────────────────────────────────────────── */
.agent-stack-section {
  border-color: var(--border-accent);
  background: linear-gradient(135deg, var(--bg-elevated) 0%, rgba(0, 230, 138, 0.03) 100%);
}

.agent-stack-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.agent-stack-header .section-title { margin-bottom: 0; }

.stack-badge {
  padding: 3px 10px;
  border-radius: 100px;
  background: var(--accent);
  color: #0a0a0f;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.stack-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stack-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--fg-muted);
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
  user-select: none;
}

.stack-chip input { position: absolute; opacity: 0; width: 0; height: 0; }

.stack-chip:hover {
  border-color: rgba(0, 230, 138, 0.5);
  color: var(--fg);
  transform: translateY(-1px);
}

.stack-chip.selected {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent);
  font-weight: 600;
}

/* ── PRICING / RATE ───────────────────────────────────────────────── */
.rate-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rate-field {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.rate-prefix,
.rate-suffix {
  color: var(--fg-muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.rate-input { text-align: center; }
.rate-sep { color: var(--fg-muted); }

/* ── PHOTO UPLOAD ─────────────────────────────────────────────────── */
.photo-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  overflow: hidden;
}

.photo-upload-area:hover,
.photo-upload-area.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.photo-icon { font-size: 2rem; margin-bottom: 8px; }
.photo-label { color: var(--fg); font-weight: 500; margin-bottom: 4px; }
.photo-hint { color: var(--fg-muted); font-size: 0.82rem; }

.photo-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.photo-preview {
  max-width: 160px;
  max-height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
}

.hidden { display: none; }

/* ── SUBMIT FOOTER ────────────────────────────────────────────────── */
.submit-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 48px;
  border-radius: 100px;
  border: none;
  background: var(--accent);
  color: #0a0a0f;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.2s;
  min-width: 260px;
}

.submit-btn:hover:not(:disabled) {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.submit-legal {
  color: var(--fg-muted);
  font-size: 0.8rem;
  text-align: center;
  max-width: 420px;
}

/* ── SUCCESS PAGE ─────────────────────────────────────────────────── */
.success-page {
  min-height: calc(100vh - 65px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.success-inner {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 20px;
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.success-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  color: var(--fg);
}

.success-subtitle {
  color: var(--fg-muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
  line-height: 1.6;
}

.success-link-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
}

.success-link-label {
  font-size: 0.8rem;
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.success-link {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.success-link:hover { text-decoration: underline; }

.copy-btn {
  padding: 6px 16px;
  border-radius: 6px;
  border: 1px solid var(--border-accent);
  background: transparent;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.copy-btn:hover { background: var(--accent-glow); }

.success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 100px;
  background: var(--accent);
  color: #0a0a0f;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--accent-dim);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: border-color 0.15s, color 0.15s;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--fg);
}

.success-tips {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: left;
}

.success-tips h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--fg);
}

.success-tips ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.success-tips li {
  color: var(--fg-muted);
  font-size: 0.9rem;
  padding-left: 20px;
  position: relative;
}

.success-tips li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* ── RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .form-section { padding: 20px 16px; }
  .field-row { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .rate-row { flex-direction: column; align-items: stretch; }
  .rate-sep { text-align: center; }
}

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