/* Entry points on the Deploy screen (spec 33) and painted location backdrops (art.json locations). */

/* ---- backdrops: a lazy <img> behind the content, dimmed so text keeps its contrast ---- */
.has-locbg { position: relative; isolation: isolate; overflow: hidden; }
.locbg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
  opacity: 0.22; filter: saturate(0.7) brightness(0.7); pointer-events: none; user-select: none;
}
.locbg--night { opacity: 0.18; filter: saturate(0.6) brightness(0.55); }
/* a scrim from the panel colour so the text side always sits on near-solid ground */
.has-locbg::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 55%, transparent) 0%, color-mix(in srgb, var(--panel) 88%, transparent) 70%);
}
.mapcard.has-locbg::after { background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 88%, transparent), color-mix(in srgb, var(--bg) 60%, transparent)); }
@media (prefers-contrast: more) { .locbg, .has-locbg::after { display: none; } }

/* ---- entry cards ---- */
.entries { display: grid; gap: 0.5rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .entries { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.entrycard {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; text-align: left; min-width: 0;
  padding: 0.65rem 0.75rem; min-height: 44px; font: inherit; color: var(--text); cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--line-2); border-radius: 4px;
}
@media (hover: hover) { .entrycard:hover:not(:disabled):not(.is-active) { border-color: var(--line-2); border-left-color: var(--cyan-dim); } }
.entrycard:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.entrycard.is-active { border-color: var(--cyan); border-left-color: var(--cyan); background: var(--cyan-wash); }
.entrycard.is-active .entrycard__name::after { content: "Chosen"; margin-left: auto; font-size: var(--fs-xs); font-weight: 600; color: var(--on-cyan); background: var(--cyan); border-radius: 3px; padding: 0 0.35rem; }
.entrycard__name { width: 100%; }
.entrycard.is-locked { cursor: default; background: transparent; border-style: dashed; border-left-style: solid; }
.entrycard.is-locked .entrycard__name, .entrycard.is-locked .entrycard__desc { color: var(--text-faint); }
.entrycard__name { font-weight: 600; font-size: var(--fs-m); display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.entrycard__tag { font-size: var(--fs-xs); font-weight: 400; color: var(--text-dim); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 0.3rem; margin-left: 0.3rem; }
.entrycard__where { font-size: var(--fs-xs); color: var(--text-dim); font-family: var(--mono); }
.entrycard__desc { font-size: var(--fs-s); color: var(--text-dim); overflow-wrap: anywhere; }
.entrycard__chips { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.entrycard__chip { font-size: var(--fs-xs); white-space: normal; }
.entrycard__how { font-size: var(--fs-xs); color: var(--cyan); }
.entrycard.is-locked .entrycard__how { color: var(--text-dim); }

/* ---- the deploy preview: a small plan of the map with the entry marked ---- */
.entrymap { margin: 0.75rem 0 0; }
.entrymap__svg { display: block; width: 100%; max-width: 560px; height: auto; aspect-ratio: 100 / 60;
  background: var(--bg-deep); border: 1px solid var(--line); border-radius: 4px; }
.entrymap__edge { stroke: var(--line-2); stroke-width: 0.35; }
.entrymap__node { fill: var(--text-faint); }
.entrymap__exit { fill: none; stroke: var(--text-dim); stroke-width: 0.5; }
.entrymap__entry circle { fill: var(--panel-3); stroke: var(--cyan-dim); stroke-width: 0.5; }
.entrymap__entry.is-locked circle { stroke: var(--line-2); stroke-dasharray: 0.8 0.6; }
.entrymap__entry.is-chosen circle { fill: var(--cyan); stroke: var(--cyan-hi); stroke-width: 0.6; }
.entrymap__entry text { fill: var(--cyan-hi); font-size: 3.4px; font-family: var(--mono); paint-order: stroke; stroke: var(--bg-deep); stroke-width: 0.8px; }
.entrymap__key { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.35rem; font-size: var(--fs-xs); color: var(--text-dim); }
.entrymap__k::before { content: ""; display: inline-block; width: 0.6rem; height: 0.6rem; margin-right: 0.3rem; vertical-align: -1px; }
.entrymap__k--entry::before { background: var(--cyan); border-radius: 50%; }
.entrymap__k--exit::before { border: 1px solid var(--text-dim); }
.entrymap__k--node::before { background: var(--text-faint); border-radius: 50%; width: 0.4rem; height: 0.4rem; }
