/* Application wizard, consultation, admin, and utility styles */

.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.save-status {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
  min-height: 1.4em;
}
.save-status.is-saving { color: var(--gold-3); }
.save-status.is-saved { color: var(--sage-2); }
.save-status.is-error { color: #8a3b32; }

.alert {
  background: rgba(232, 210, 200, 0.45);
  border: 1px solid var(--blush-2);
  color: var(--espresso);
  padding: 16px 18px;
  font-size: 16px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.alert.error {
  background: rgba(138, 59, 50, 0.08);
  border-color: rgba(138, 59, 50, 0.35);
}

.resume-banner {
  background: var(--ivory);
  border: 1px solid var(--champagne);
  padding: 20px 22px;
  margin-bottom: 32px;
}
.resume-banner strong.code {
  font-family: var(--serif);
  font-size: 28px;
  letter-spacing: 0.08em;
  display: block;
  margin: 8px 0 4px;
  color: var(--espresso);
  font-weight: 600;
}
.resume-banner p { color: var(--muted); font-size: 16px; line-height: 1.6; }

.progress {
  margin-bottom: 36px;
}
.progress-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 10px;
}
.progress-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.progress-track {
  height: 4px;
  background: var(--ivory-3);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  width: 0%;
  transition: width 0.35s ease;
}

.step-panel[hidden],
.gate-panel[hidden],
#thanks[hidden],
#wizard[hidden],
#gate[hidden],
#admin-app[hidden],
#admin-login[hidden] { display: none !important; }

.step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
  align-items: center;
}
.step-nav .spacer { flex: 1; }

.field .error-text {
  font-size: 14px;
  color: #8a3b32;
  min-height: 0;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-bottom-color: #8a3b32; }

.photo-counter {
  font-size: 16px;
  color: var(--muted);
  margin: 0 0 16px;
}
.photo-counter.ready { color: var(--sage-2); }

.dropzone { cursor: pointer; transition: border-color 0.2s ease, background 0.2s ease; }
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--gold);
  background: rgba(217, 196, 160, 0.28);
}
.dropzone input[type="file"] { display: none; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin-top: 22px;
}
.photo-card {
  position: relative;
  background: var(--ivory);
  border: 1px solid var(--ivory-3);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  cursor: grab;
}
.photo-card:active { cursor: grabbing; }
.photo-card.is-dragging { opacity: 0.45; }
.photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-card .photo-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 6px;
}
.photo-card button {
  background: rgba(44, 36, 31, 0.82);
  color: var(--ivory);
  border: 0;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.photo-card .order {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(246, 240, 232, 0.92);
  color: var(--espresso);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 4px 7px;
}

.review-block {
  border-top: 1px solid var(--ivory-3);
  padding: 22px 0;
}
.review-block h4 {
  font-family: var(--serif);
  font-size: 24px;
  margin-bottom: 10px;
}
.review-block dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 20px; }
.review-block dt {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  padding-top: 4px;
}
.review-block dd { font-size: 17px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }
.review-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.review-photos img { width: 72px; height: 96px; object-fit: cover; }

.thanks-card {
  background: #faf6f1;
  border: 1px solid var(--ivory-3);
  padding: 56px 48px;
  text-align: center;
}
.thanks-card h2 { font-size: 48px; margin: 10px 0 16px; }
.thanks-card p { color: var(--muted); font-size: 18px; line-height: 1.65; max-width: 440px; margin: 0 auto; }

.legal-page { background: var(--ivory); padding: 88px 0 120px; }
.legal-page .prose { max-width: 720px; }
.legal-page h2 { font-size: 36px; margin: 36px 0 12px; }
.legal-page p, .legal-page li { font-size: 18px; line-height: 1.7; color: var(--muted); margin-bottom: 16px; }
.legal-page ul { list-style: disc; padding-left: 22px; margin-bottom: 16px; }
.legal-page a { text-decoration: underline; text-underline-offset: 3px; }

/* Admin */
.admin-shell { background: var(--ivory); min-height: 100vh; padding: 40px 0 80px; }
.admin-login {
  max-width: 420px;
  margin: 80px auto;
  background: #faf6f1;
  border: 1px solid var(--ivory-3);
  padding: 40px 36px 44px;
}
.admin-table-wrap { overflow-x: auto; }
table.admin {
  width: 100%;
  border-collapse: collapse;
  background: #faf6f1;
  font-size: 16px;
}
table.admin th, table.admin td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--ivory-3);
  vertical-align: top;
}
table.admin th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
table.admin tr { cursor: pointer; }
table.admin tr:hover td { background: rgba(232, 210, 200, 0.28); }
.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid var(--gold);
}
.pill.draft { border-color: var(--ivory-3); color: var(--muted); }
.admin-filters { display: flex; gap: 10px; margin: 20px 0 24px; flex-wrap: wrap; }
.admin-detail { margin-top: 28px; background: #faf6f1; border: 1px solid var(--ivory-3); padding: 32px; }
.admin-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 16px; }
.admin-photos img { width: 100%; height: 220px; object-fit: cover; background: var(--ivory-2); }

.tab-link.is-active { border-bottom: 1px solid var(--gold); }

@media (max-width: 800px) {
  .review-block dl { grid-template-columns: 1fr; gap: 2px; }
  .review-block dt { padding-top: 10px; }
  .thanks-card, .application { padding: 36px 24px 44px; }
  .admin-login { margin: 40px 16px; }
}

/* The .btn display rule otherwise overrides the hidden attribute. */
[hidden] { display: none !important; }

/* Checkbox copy inside .field should stay sentence case, not uppercase labels. */
.field > .check,
.field label.check {
  text-transform: none;
  letter-spacing: 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}
