/* Gameficate Craft — Review issues, JSON view, drop overlay, toast, dialogs, history rows and score summary. */
/* ---------- History rows and review issues ---------- */
.hist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2px solid var(--line);
  margin-top: 6px;
}
.hist-row b {
  flex: 1;
  font-size: 14px;
}
.hist-row span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.issues {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.issue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--soft);
  font-weight: 700;
  font-size: 15px;
}
.issue.err {
  background: #fdecec;
}
.issue.warn {
  background: #fff6de;
}
.issue .ic {
  font-size: 18px;
}
.issue .go {
  margin-left: auto;
}
/* ---------- JSON view, drop overlay and toast ---------- */
pre.json {
  background: #0f2539;
  color: #d7e6f5;
  border-radius: 14px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 520px;
  overflow: auto;
  white-space: pre;
}
.drop {
  position: fixed;
  inset: 0;
  background: rgba(23, 50, 77, 0.75);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 40px;
  z-index: 5000;
}
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 800;
  opacity: 0;
  transition: 0.25s;
  z-index: 6000;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
/* ---------- Modal dialogs and the location picker ---------- */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(10, 25, 40, 0.55);
  display: grid;
  place-items: center;
  z-index: 4000;
}
.modal {
  width: min(900px, 92vw);
  background: #fff;
  border-radius: 20px;
  padding: 20px;
}
.modal h3 {
  font-family: var(--display);
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 10px;
}
#pickmap {
  height: 460px;
  border-radius: 14px;
  border: 2px solid var(--line);
}
.small {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.score-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.score-sum div {
  flex: 1 1 140px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--soft);
  border: 2px solid var(--line);
}
.score-sum div.pass {
  background: #e6f8ef;
  border-color: #a8e3c6;
}
.score-sum b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  color: var(--navy);
  line-height: 1.1;
}
.score-sum span {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

/* ---------- 📍 Choose a location dialog (pickLocation in js/ui/formFields.js) ---------- */
.pick-modal .place-search {
  margin-top: 6px;
}
.pick-where {
  margin-right: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- ©️ Credits & licences (js/ui/CreditsDialog.js) ---------- */
.credits-modal {
  width: min(720px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
}
.credits-modal h4 {
  margin: 14px 0 6px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}
.credits-list {
  list-style: none;
  display: grid;
  gap: 6px;
}
.credits-list li {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--soft);
  font-size: 14px;
}
.credits-list li span {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}
.credits-list a {
  color: var(--navy);
  font-weight: 900;
}

/* ---------- 🎨 / 🔤 A configurator inside Craft (js/ui/ConfiguratorFrame.js) ---------- */
.cfg-bg {
  padding: 2vh 2vw;
}
.modal.cfg-modal {
  width: 96vw;
  height: 94vh;
  max-width: none;
  display: flex;
  flex-direction: column;
  padding: 12px 14px 14px;
  gap: 10px;
}
.cfg-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.cfg-head h3 {
  margin: 0;
}
.cfg-head .spacer {
  flex: 1;
}
.cfg-status {
  margin-left: 4px;
}
.cfg-frame {
  flex: 1;
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

/* ---------- 🔑 Licence key (model/Licence.js) ---------- */
.foot-bar .foot-lic {
  flex: 0 0 auto;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 61, 0.7);
  background: none;
  color: #ffd76a;
  font-weight: 800;
}
.foot-bar .foot-lic:hover,
.foot-bar .foot-lic:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}
.lic-bg {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(15, 30, 45, 0.55);
  display: grid;
  place-items: center;
  padding: 16px;
}
.lic-modal {
  width: 560px;
  max-width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 24px 70px rgba(10, 25, 40, 0.3);
}
.lic-modal h3 {
  margin-bottom: 6px;
  color: var(--navy);
}
.lic-modal textarea {
  width: 100%;
  margin-top: 10px;
  font:
    13px/1.4 ui-monospace,
    Menlo,
    Consolas,
    monospace;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 12px;
  resize: vertical;
}
.lic-msg {
  min-height: 22px;
  margin: 8px 0;
  font-weight: 700;
}
.lic-msg.ok {
  color: var(--green);
}
.lic-msg.bad {
  color: var(--red);
}
.lic-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

/* Online gallery (cloud/CloudLink.js, cloud/PublishDialog.js) */
.cloud-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: linear-gradient(160deg, #214667, #102a42 72%);
}
.cloud-gate-box {
  display: grid;
  justify-items: start;
  gap: 12px;
  width: min(520px, 100%);
  padding: 26px;
  border-radius: 20px;
  background: #fff;
}
.cloud-gate-box h2 {
  font-family: var(--display);
  font-size: 26px;
  color: var(--navy);
}
.modal.cloud-publish {
  display: grid;
  gap: 10px;
  width: min(560px, 94vw);
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.cloud-publish .cp-f {
  display: grid;
  flex: 1;
  gap: 4px;
  font-weight: 800;
  color: var(--navy);
}
.cloud-publish .cp-c {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}
.cloud-publish .warn {
  color: #8a5300;
}
