/* css/overlays.css — Overlays and late additions: Dashboard, unlock-intro modal, list modals (Next Steps, Achievements). Loaded after the files before it (see css/style.css). */

.dashboard-section {
  margin-bottom: 2rem;
}

.dashboard-section h3 {
  border-bottom: 2px solid var(--color-border-light);
  padding-bottom: 0.35rem;
  margin-bottom: 0.5rem;
}

.dashboard-subheading {
  font-weight: bold;
  font-size: 0.85rem;
  margin: 0.75rem 0 0.25rem;
}

.dashboard-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 0.15rem 0;
  font-size: 0.9rem;
}

.dashboard-stat-label {
  color: var(--color-border-dark);
}

.dashboard-stat-value {
  font-weight: bold;
}

.dashboard-empty-hint {
  font-size: 0.85rem;
  color: var(--color-text-quiet);
  font-style: italic;
  margin: 0.25rem 0;
}

/* ---- "Click to unlock" intro system (see ui/unlock-intro-ui.js, engine/unlock-intro-system.js) ---- */

/* A feature that just unlocked but hasn't been introduced yet: its button reads "Click to
   unlock". A static gold highlight (no animation) so it stands out from both the greyed "???"
   of a locked feature and the normal look of an opened one. Works on nav buttons, zone/follower
   boxes and sub-tab buttons alike. */
.unlock-pending,
.zone-box-pending,
.party-subnav-pending,
.zone-menu-subnav-pending {
  cursor: pointer;
  color: var(--color-unlock-text);
  background: var(--color-unlock-bg);
  border: 2px solid var(--color-unlock-border);
  font-weight: bold;
  box-shadow: 0 0 6px rgba(224, 168, 0, 0.55);
}

/* The intro modal itself. Reuses .modal-overlay/.modal-box; only the pieces below are new. */
.unlock-intro-box {
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.unlock-intro-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-unlock-kicker-text);
}

.unlock-intro-image {
  display: block;
  width: 100%;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  margin-bottom: 0.75rem;
}

/* display:block above would otherwise override the hidden attribute, so a picture-less story modal showed the last modal's image. */
.unlock-intro-image[hidden] {
  display: none;
}

/* A zone's own background picture: cropped to a wide banner rather than shown whole. */
.unlock-intro-image-backdrop {
  height: 170px;
  object-fit: cover;
}

.unlock-intro-tagline {
  margin-top: -0.4rem;
  font-style: italic;
  color: var(--color-text-secondary);
}

.unlock-intro-section-heading {
  margin: 0.9rem 0 0.25rem;
  font-weight: bold;
}

.unlock-intro-list {
  margin: 0 0 0.5rem;
  padding-left: 1.2rem;
}

/* Next Steps and Achievements modals (see js/ui/next-steps-ui.js, achievements-ui.js): a header, a scrollable list
   of boxes, a Close button. */
.list-modal-box {
  max-width: 560px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.list-modal-intro {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.list-modal-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 1rem;
}

.list-modal-box-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid var(--color-border-dark);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--color-white);
}

.list-modal-link {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 0.8rem;
}

.next-step-mark {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  box-sizing: border-box;
  border: 2px solid var(--color-border-dark);
  border-radius: 50%;
  text-align: center;
  line-height: 1.1rem;
  font-weight: bold;
}

.next-step-text {
  font-weight: bold;
}

.next-step-done {
  border-color: var(--color-success-border);
  background: var(--color-success-bg);
}

.next-step-done .next-step-mark {
  border-color: var(--color-party-safe-text);
  background: var(--color-party-safe-text); /* darker green so the white check reaches 4.5:1 */
  color: var(--color-white);
}

.next-step-done .next-step-text {
  font-weight: normal;
  color: var(--color-text-secondary);
}

.achievement-body {
  flex: 1 1 auto;
  min-width: 0;
}

.achievement-time {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
}

.achievement-row-new {
  border-color: var(--color-unlock-border);
  background: var(--color-unlock-bg);
}

.achievement-new-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  color: var(--color-unlock-text);
}

/* A follower's own bust in their "Click to unlock" modal (instead of the screenshot banner). */
.unlock-intro-image-npc {
  width: auto;
  height: 200px;
  max-width: 60%;
  margin: 0 auto 0.75rem;
  border: none;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 3px var(--color-portrait-halo)) drop-shadow(0 0 1px var(--color-border-dark));
}

/* A gold halo around a top tab with something new waiting inside it (ui-main.js: the Entourage tab while a follower's
   "Click to unlock" is pending). Static, no animation, so Reduce motion has nothing to stop. */
.nav-button-halo {
  border-color: var(--color-unlock-border);
  box-shadow: 0 0 0 2px var(--color-unlock-border), 0 0 10px 3px var(--color-unlock-border);
}

/* The Battle view's layer controls while a new player has Layer 1 open but has never raised the layer (same halo as above). */
.difficulty-row-highlight {
  border-radius: 6px;
  box-shadow: 0 0 0 2px var(--color-unlock-border), 0 0 10px 3px var(--color-unlock-border);
}

/* The hire picker (js/ui/hire-picker-ui.js): three candidate cards side by side (stacked on a narrow screen), the
   chosen one outlined in gold. */
.hire-picker-box {
  max-width: 720px;
}

.hire-picker-candidates {
  display: flex;
  gap: 0.75rem;
  margin: 0.75rem 0;
}

.hire-candidate {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.5rem;
  border: 2px solid var(--color-border-light);
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.hire-candidate-selected {
  border-color: var(--color-party-selected-border);
  background: var(--color-pending-bg);
}

.hire-candidate-portrait {
  width: 96px;
  height: 120px;
  object-fit: cover;
  image-rendering: pixelated;
  border-radius: 4px;
}

.hire-candidate-arrows {
  display: flex;
  gap: 4px;
}

.hire-candidate-name {
  font-weight: 600;
}

.hire-candidate-trait {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.hire-candidate-line {
  font-size: 0.85rem;
  font-style: italic;
}

@media (max-width: 600px), (orientation: landscape) and (max-height: 520px) {
  .hire-candidate-portrait {
    width: 64px;
    height: 80px;
  }
}
