/* ICON apply-flow shared styles — Phase 1, Commit 5.
 *
 * Used by the public application step pages:
 *   apply.html         (Step 1 — basics)
 *   apply-verify.html  (Step 2 — email verification)
 *   apply-review.html  (Step 3 — review + submit)
 *   apply-photos.html  (legacy redirect)
 *
 * Extracted from the original single-page apply.html so the multi-
 * page rebuild ships consistent styling without multiple copies of the
 * same CSS to keep in sync.
 */

/* Hamburger (matches site) */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: all 0.3s;
}
@media (max-width: 768px) {
  .nav-hamburger { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0a0a0f;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 20px 24px;
  }
  .nav-menu.open { display: block; }
  .nav-links { flex-direction: column; gap: 16px; }
}

/* Page shell */
.apply-hero {
  min-height: auto !important;
  padding: 72px 0 24px;
  text-align: center;
}
.apply-hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.apply-hero .accent {
  background: linear-gradient(135deg, #3B82F6 0%, #3B82F6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.apply-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* Progress */
.apply-progress {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 0 24px;
}
.apply-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.apply-progress-step { color: rgba(255,255,255,0.5); }
.apply-progress-step strong { color: #fff; }
.apply-progress-title {
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}
.apply-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
}
.apply-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3B82F6, #3B82F6);
  border-radius: 100px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card */
.apply-wrap {
  max-width: 760px;
  margin: 28px auto 80px;
  padding: 0 24px;
}
.apply-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 40px;
}
@media (max-width: 640px) {
  .apply-card { padding: 24px; border-radius: 16px; }
  .apply-hero { padding: 56px 0 20px; }
}
.apply-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.apply-step-sub {
  color: rgba(255,255,255,0.6);
  font-size: 0.95rem;
  margin-bottom: 28px;
}
.apply-inline-link {
  color: rgba(255,255,255,0.68);
  font-size: 0.95rem;
  margin-top: 18px;
}
.apply-inline-link a { color: #60a5fa; font-weight: 700; text-decoration: none; }
.apply-inline-link a:hover { color: #fff; }

/* Fields */
.field { margin-bottom: 18px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 540px) {
  .field-row { grid-template-columns: 1fr; }
}
.field label.lbl {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: rgba(255,255,255,0.85);
}
.req { color: #ef4444; margin-left: 2px; }
.inp, select.inp, textarea.inp {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 13px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s;
  -webkit-appearance: none;
  appearance: none;
}
select.inp {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}
.inp::placeholder { color: rgba(255,255,255,0.4); }
.inp:focus {
  outline: none;
  border-color: #3B82F6;
  background: rgba(59,130,246,0.08);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.inp.error {
  border-color: #ef4444;
  background: rgba(239,68,68,0.05);
}
.err-msg {
  color: #ef4444;
  font-size: 0.8rem;
  margin-top: 6px;
  display: none;
}
.field.has-error .err-msg { display: block; }
.field-help {
  color: rgba(255,255,255,0.5);
  font-size: 0.8rem;
  margin-top: 6px;
}

/* Nav buttons */
.apply-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.apply-nav .spacer { flex: 1; }
.btn-step {
  padding: 13px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-back {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
}
.btn-back:hover { background: rgba(255,255,255,0.05); }
.btn-next, .btn-submit {
  background: #fff;
  color: #0a0a0f;
}
.btn-next:hover, .btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255,255,255,0.15);
}
.btn-next:disabled, .btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Global error */
.form-global-error {
  display: none;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.4);
  color: #fca5a5;
  padding: 12px 14px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 0.9rem;
}
.form-global-error.show { display: block; }

/* Info / success boxes */
.info-box {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.55;
}
.success-box {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.35);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: rgba(167,243,208,0.95);
}

.status-result {
  margin-top: 24px;
  padding: 22px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}
.status-result h3 {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.64);
  margin-bottom: 8px;
}
.status-result strong {
  display: block;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.status-result p {
  color: rgba(255,255,255,0.66);
  margin: 0;
}
.queue-meter {
  margin-top: 18px;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.09);
}
.queue-meter span {
  display: block;
  height: 100%;
  width: var(--queue-progress, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, #3B82F6, #3B82F6);
}

/* Verification code field */
.code-input {
  letter-spacing: 0.5em;
  text-align: center;
  font-size: 1.4rem !important;
  font-weight: 600;
  font-feature-settings: "tnum" 1;
}

/* Photo upload step */
.condition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  .condition-grid { grid-template-columns: 1fr; }
}
.condition-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px;
  transition: all 0.18s;
}
.condition-card.complete {
  border-color: rgba(16,185,129,0.5);
  background: rgba(16,185,129,0.05);
}
.condition-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.condition-title {
  font-weight: 600;
  font-size: 0.95rem;
}
.condition-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  font-weight: 600;
}
.condition-card.complete .condition-status {
  color: rgba(16,185,129,0.9);
}
.condition-desc {
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
  margin-bottom: 14px;
  line-height: 1.45;
}
.condition-preview {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  margin-bottom: 12px;
  overflow: hidden;
  position: relative;
}
.condition-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.condition-actions {
  display: flex;
  gap: 8px;
}
.condition-actions .btn-step {
  flex: 1;
  padding: 10px 12px;
  font-size: 0.85rem;
}
.condition-note {
  margin-top: 12px;
}
.upload-progress {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 8px;
}

/* Review summary */
.review-summary {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}
.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 0.92rem;
}
.review-row dt {
  color: rgba(255,255,255,0.55);
}
.review-row dd {
  margin: 0;
  color: #fff;
  text-align: right;
  word-break: break-word;
}
.review-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.review-photo-tile {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}
.review-photo-tile .tag {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(0,0,0,0.7);
  font-size: 0.7rem;
  padding: 3px 7px;
  border-radius: 6px;
}
.review-photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Success screen */
.apply-success {
  text-align: center;
  padding: 20px 0;
}
.apply-success .check {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3B82F6, #3B82F6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
}
.apply-success h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.apply-success p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 10px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.apply-success .success-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 28px;
  flex-wrap: wrap;
}
.apply-success a.btn-primary,
.apply-success a.btn-outline {
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.apply-success a.btn-primary {
  background: #fff;
  color: #0a0a0f;
}
.apply-success a.btn-outline {
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
}

/* Loading state */
.loading {
  text-align: center;
  padding: 40px 0;
  color: rgba(255,255,255,0.5);
}

/* ── Onboarding-refresh sections + chip groups (2026-05-26) ────
   apply.html now leads with "Your vibe" + "When you're free" before
   the legal/contact info. Each is a fieldset rendered with no
   browser-default border, plus a custom legend label, plus a chip
   group that mirrors its selection into a hidden JSON input. */
.apply-section {
  border: none;
  padding: 0;
  margin: 0 0 28px 0;
}
.apply-section-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
  margin-bottom: 6px;
  padding: 0;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
}
.chip:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.22);
}
.chip:active {
  transform: translateY(0.5px);
}
.chip.chip-active {
  background: #fff;
  border-color: #fff;
  color: #0a0a0f;
}
.chip:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .chip {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* ── Application-ID copy button (2026-05-26) ─────────────────────
   Sits inline next to "Application ID:" on the post-submit
   confirmation. Whole pill is the click target — id text + copy
   icon + an aria-live feedback span that briefly says "Copied". */
.copy-id-btn {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  padding: 4px 10px;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.copy-id-btn:hover {
  background: rgba(255,255,255,0.09);
  border-color: rgba(255,255,255,0.22);
}
.copy-id-btn:focus-visible {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}
.copy-id-btn code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
}
.copy-id-icon {
  opacity: 0.7;
  flex: 0 0 auto;
}
.copy-id-btn-copied {
  background: rgba(16,185,129,0.12);
  border-color: rgba(16,185,129,0.4);
  color: rgba(167,243,208,0.95);
}
.copy-id-btn-copied .copy-id-icon { opacity: 1; }
.copy-id-feedback {
  font-size: 0.78rem;
  font-weight: 600;
}

/* ── Style-sample tiles (2026-05-26) ─────────────────────────────
   Three image-upload placeholders under "Where folks can see your
   work" on /apply. Empty state = dashed border + plus icon. Filled
   state = full-bleed preview + filename pill + remove button.
   File picker is bound to the implicit <label> on each tile. */
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 540px) {
  .sample-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 360px) {
  .sample-grid { grid-template-columns: 1fr; }
}

.sample-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  border: 1px dashed rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.03);
  display: block;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.sample-tile:hover {
  border-color: rgba(255,255,255,0.42);
  background: rgba(255,255,255,0.06);
}
.sample-tile:focus-within {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}
.sample-tile-filled {
  border-style: solid;
  border-color: rgba(255,255,255,0.18);
  background: rgba(0,0,0,0.2);
}

.sample-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(255,255,255,0.55);
}
.sample-empty-plus {
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  color: rgba(255,255,255,0.7);
}
.sample-empty-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.sample-preview {
  position: absolute;
  inset: 0;
  display: block;
}
.sample-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sample-meta {
  position: absolute;
  left: 6px;
  right: 30px;
  bottom: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.55);
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sample-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.sample-remove:hover {
  background: rgba(244,63,94,0.85);
}

.sample-error {
  margin-top: 10px;
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Deferred-upload indicator on /apply-review */
.sample-upload-shell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px auto 4px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.32);
  color: rgba(191,219,254,0.95);
  font-size: 0.82rem;
  font-weight: 600;
}
.sample-upload-shell-done {
  background: rgba(16,185,129,0.10);
  border-color: rgba(16,185,129,0.32);
  color: rgba(167,243,208,0.95);
}
.sample-upload-shell-done .sample-upload-spinner { display: none; }
.sample-upload-spinner {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  animation: sample-spin 0.85s linear infinite;
}
@keyframes sample-spin {
  to { transform: rotate(360deg); }
}
