/* Delight pass: quick-add fold, milestone moments, the document drop zone, recovery pages, and Today's momentum.
   Kept apart from app.css so it can change without touching the base styles. Uses app.css's tokens; app.css's
   prefers-reduced-motion rule stops every animation here too. */

/* ---------- Adding a job: essentials first, the rest folded ---------- */
.actions--quick { align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.more-details { margin: 1.5rem 0 1rem; border: 2px dashed var(--border-soft); border-radius: var(--radius);
  transition: border-color .2s ease, background-color .2s ease; }
.more-details[open] { border-style: solid; background: var(--bg-softer); padding-bottom: .25rem; }
.more-details > summary {
  cursor: pointer; list-style: none; display: grid; grid-template-columns: auto 1fr; column-gap: .6rem;
  align-items: center; padding: .75rem 1.25rem; min-height: 44px; border-radius: var(--radius);
}
.more-details > summary::-webkit-details-marker { display: none; }
.more-details > summary::before {
  content: "+"; content: "+" / ""; grid-row: span 2; display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem;
  border-radius: 50%; background: var(--info-bg); color: var(--primary); font-weight: 800;
  transition: transform .25s var(--ease-out), background-color .2s ease;
}
.more-details[open] > summary::before { transform: rotate(45deg); background: var(--gold); color: var(--navy-deep); }
.more-details > summary:hover { background: var(--bg-soft); }
.more-details__title { font-weight: 700; color: var(--primary); }
.more-details__hint { grid-column: 2; color: var(--text-muted); font-size: .95rem; }
.more-details > :not(summary) { margin-left: 1rem; margin-right: 1rem; }
.more-details[open] > .panel { animation: unfold .3s var(--ease-out) both; }
@keyframes unfold { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Milestones: approved, submitted, won, signed ---------- */
.message--milestone {
  background: var(--gold-tint); color: var(--navy); border-color: var(--gold);
  align-items: center; font-weight: 700;
}
.milestone__mark {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem;
  border-radius: 50%; background: var(--gold); color: var(--navy-deep); font-size: 1.15rem;
  animation: pop .6s var(--ease-out) .1s both;
}
.milestone__burst { position: absolute; inset: 0; pointer-events: none; }
.milestone__burst i {
  position: absolute; left: 50%; top: 50%; width: .4rem; height: .4rem; margin: -.2rem; border-radius: 50%;
  background: var(--gold); opacity: 0; animation: spark .8s var(--ease-out) .25s both;
}
.milestone__burst i:nth-child(even) { background: var(--primary); width: .3rem; height: .3rem; margin: -.15rem; }
.milestone__burst i:nth-child(1) { --dx: 0; --dy: -1.7rem; }
.milestone__burst i:nth-child(2) { --dx: 1.2rem; --dy: -1.2rem; }
.milestone__burst i:nth-child(3) { --dx: 1.7rem; --dy: 0; }
.milestone__burst i:nth-child(4) { --dx: 1.2rem; --dy: 1.2rem; }
.milestone__burst i:nth-child(5) { --dx: 0; --dy: 1.7rem; }
.milestone__burst i:nth-child(6) { --dx: -1.2rem; --dy: 1.2rem; }
.milestone__burst i:nth-child(7) { --dx: -1.7rem; --dy: 0; }
.milestone__burst i:nth-child(8) { --dx: -1.2rem; --dy: -1.2rem; }
/* Ends invisible, so with reduced motion (animations cut to nothing) the sparks are simply never seen. */
@keyframes spark {
  0% { opacity: 1; transform: translate(0, 0) scale(.6); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}
.message--milestone .message__text { animation: shine 1.6s ease-out .3s both; }
@keyframes shine { 0% { text-shadow: 0 0 0 transparent; } 30% { text-shadow: 0 0 .6rem var(--focus-halo); } }

/* ---------- Document drop zone ---------- */
.drop-zone {
  position: relative; display: grid; place-items: center; gap: .35rem; text-align: center; padding: 1.5rem 1rem;
  border: 2px dashed var(--border); border-radius: var(--radius); background: var(--bg-softer); max-width: 40rem;
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--ease-out);
  cursor: pointer;
}
.drop-zone:hover { background: var(--info-bg); border-color: var(--primary); }
.drop-zone:focus-within { outline: 3px solid var(--focus-dark); outline-offset: 2px; box-shadow: 0 0 0 6px var(--focus-halo); }
.drop-zone.is-dragging { background: var(--gold-tint); border-color: var(--gold-dark); border-style: solid; transform: scale(1.01); }
/* The real input covers the whole zone, so a click anywhere opens the picker and a drop lands on it natively. */
.drop-zone input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone__icon { font-size: 1.6rem; line-height: 1; color: var(--primary); }
.drop-zone__prompt { font-weight: 700; color: var(--primary); }
.drop-zone__chosen { display: none; align-items: center; gap: .5rem; font-weight: 700; color: var(--ok-text); }
.drop-zone.has-file { border-style: solid; border-color: var(--ok-text); background: var(--ok-bg); }
.drop-zone.has-file .drop-zone__chosen { display: inline-flex; animation: message-in .3s var(--ease-out) both; }
.drop-zone.has-file .drop-zone__prompt, .drop-zone.has-file .drop-zone__icon { display: none; }
.drop-zone__size { font-weight: 400; color: var(--text-muted); }
.drop-zone.has-problem { border-color: var(--bad-text); background: var(--bad-bg); animation: nudge .3s ease-in-out; }
@keyframes nudge { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- Recovery pages: expired form, not found, server error ---------- */
.recovery { display: flex; gap: 1.25rem; align-items: flex-start; margin: 1rem 0 2rem; }
.recovery h1 { margin-top: 0; }
.recovery__mark {
  flex: none; display: inline-grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: var(--gold-tint); border: 2px solid var(--gold); color: var(--navy); font-weight: 800; font-size: 1.5rem;
  animation: pop .5s var(--ease-out) both;
}
.recovery .actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.recovery__places-title { font-size: 1.05rem; margin: 2rem 0 .5rem; }
.recovery__places { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.recovery__places a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--border-soft);
  border-radius: 999px; text-decoration: none; font-weight: 700;
  transition: border-color .15s ease, background-color .15s ease, transform .15s var(--ease-out);
}
.recovery__places a:hover { border-color: var(--primary); background: var(--info-bg); transform: translateY(-1px); }
@media (max-width: 30rem) { .recovery { flex-direction: column; gap: .5rem; } }

/* ---------- Today: momentum and the quiet all-clear ---------- */
.momentum { display: inline-flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .35rem 1rem .35rem .35rem;
  border-radius: 999px; background: var(--info-bg); color: var(--navy); }
.momentum__count {
  display: inline-grid; place-items: center; min-width: 2rem; height: 2rem; padding: 0 .4rem; border-radius: 999px;
  background: var(--navy); color: #fff; font-weight: 800; animation: pop .5s var(--ease-out) .15s both;
}
.watching { margin: -.5rem 0 1.5rem; }
.watching__title { font-size: 1rem; color: var(--text-muted); margin: 0 0 .5rem; }
.watching__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.watching__list li {
  padding: .15rem .7rem; border-radius: 999px; background: var(--neutral-bg); color: var(--neutral-text); font-size: .9rem;
  animation: message-in .3s var(--ease-out) both;
}
.watching__list li:nth-child(n+4) { animation-delay: .05s; }
.watching__list li:nth-child(n+7) { animation-delay: .1s; }
