/*
 * Achievement card deck: a stack of badge cards the user flips through with
 * left/right arrows. Shared by the spotting-detail "See all" modal and the
 * new-spotting publish celebration. JS (js/achievement-deck.js) positions the
 * cards and wires the controls.
 */
.ach-deck { width: 100%; }

.ach-deck-stack {
  position: relative;
  height: 600px;        /* fixed: cards are absolutely positioned within it */
  margin: 0 auto;
  max-width: 440px;
}

.ach-card {
  position: absolute;
  top: 0; left: 0; right: 0;
  margin: 0 auto;
  height: 560px;        /* < stack height, so cards behind peek out the bottom */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 36px 30px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transform-origin: top center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  will-change: transform, opacity;
}
.ach-card-img {
  width: 300px;
  max-width: 82%;       /* scale down on narrow cards instead of overflowing */
  aspect-ratio: 1 / 1;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);   /* rounded image corners */
  flex-shrink: 0;
}
.ach-card-title { font-size: 23px; font-weight: 700; letter-spacing: -0.01em; }
.ach-card-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  /* Clamp long subtitles so every card keeps the same height. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 520px) {
  .ach-deck-stack { height: 480px; }
  .ach-card { height: 440px; padding: 26px 22px; gap: 16px; }
  .ach-card-title { font-size: 20px; }
  .ach-card-sub { font-size: 15px; }
}

.ach-deck-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 16px;
}
.ach-deck-btn {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), opacity 0.15s var(--ease);
}
.ach-deck-btn:hover:not(:disabled) { color: var(--unique); border-color: var(--unique); }
.ach-deck-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.ach-deck-counter {
  min-width: 52px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: reduce) {
  .ach-card { transition: none; }
}
