/* Maps by Funk — Atlas: Creator Studio (studio.js). Tokens from styles.css;
   page scaffolding from views.css. */

.studio-kicker {
  margin: 0 0 2px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
}

.plan-creator {
  background: #e8b877;
}

.btn-owner {
  border-color: var(--teal-deep);
  color: var(--teal);
}

.btn-danger {
  height: 34px;
  padding: 0 14px;
  border: 1px solid #b4574f;
  border-radius: 5px;
  background: transparent;
  color: #e08d85;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 12.5px;
}

.btn-danger:hover {
  background: rgba(180, 87, 79, 0.16);
}

a.back {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.count-pill.is-on {
  background: rgba(103, 203, 166, 0.2);
  color: var(--teal);
}

.studio-saved {
  margin-left: 8px;
  font-size: 12px;
  color: var(--teal);
}

.studio .pf-row {
  margin-bottom: 10px;
}

/* ---------- studio lists (visited, wishlist) ---------- */

.studio-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.studio-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}

.studio-list li:last-child {
  border-bottom: 0;
}

.studio-row-body {
  flex: 1;
  min-width: 0;
}

.studio-row-body b {
  display: block;
  font-size: 13.5px;
}

.studio-row-body span {
  display: block;
  font-size: 11.5px;
  color: var(--text-faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8, 12, 14, 0.72);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(640px, 100%);
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--teal-deep);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 16px;
}

.modal-x {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 20px;
  line-height: 1;
}

.modal-x:hover {
  background: var(--surface-hi);
  color: var(--text);
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--near-black);
}

.modal-spacer {
  flex: 1;
}

/* ---------- form fields ---------- */

.pf-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.pf-field[hidden] {
  display: none;
}

.pf-field > span,
.pf-types legend,
.pf-rating legend {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.pf-grow {
  flex: 1 1 200px;
}

.pf-num {
  width: 84px;
}

.pf-field input,
.pf-field select,
.pf-field textarea,
.pf-search input,
.studio .pf-field select,
.studio .pf-field input {
  height: 34px;
  padding: 0 10px;
  background: var(--near-black);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.pf-field textarea {
  height: auto;
  padding: 8px 10px;
  resize: vertical;
  line-height: 1.45;
}

.pf-field select option {
  background: var(--near-black);
}

.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus,
.pf-search input:focus {
  outline: none;
  border-color: var(--teal);
}

.pf-types,
.pf-rating {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.pf-types legend,
.pf-rating legend {
  margin-bottom: 6px;
}

.pf-types {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pf-types legend {
  width: 100%;
}

.pf-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pf-type span {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 12.5px;
  color: var(--text-dim);
  cursor: pointer;
}

.pf-type input:checked + span {
  background: var(--teal);
  border-color: var(--teal);
  color: var(--near-black);
  font-weight: 700;
}

.pf-type input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.pf-search {
  display: flex;
  gap: 6px;
}

.pf-search input {
  flex: 1;
  min-width: 0;
}

.pf-results {
  list-style: none;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--near-black);
  max-height: 190px;
  overflow-y: auto;
}

.pf-results[hidden] {
  display: none;
}

.pf-results button {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-align: left;
}

.pf-results button:hover,
.pf-results button:focus-visible {
  background: var(--surface-hi);
  outline: none;
}

.pf-results b {
  font-size: 13px;
}

.pf-results span {
  font-size: 11.5px;
  color: var(--text-faint);
}

.pf-results-note {
  padding: 8px;
  font-size: 12px;
  color: var(--text-faint);
}

.pf-map {
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.pf-pin {
  cursor: grab;
}

.pf-hint {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-faint);
}

.pf-coords {
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}

.pf-attrib {
  margin: -2px 0 0;
  font-size: 10.5px;
  color: var(--text-faint);
}

.pf-now {
  height: 34px;
}

.pf-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: 5px;
  background: rgba(180, 87, 79, 0.16);
  border: 1px solid #b4574f;
  color: #f0b3ad;
  font-size: 12.5px;
}

.pf-error[hidden] {
  display: none;
}

/* ---------- visited places on the profile map ---------- */

.cv-visited-marker {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid var(--off-white);
  background: rgba(17, 21, 23, 0.5);
  box-shadow: 0 0 0 1.5px var(--near-black);
}

.lg-visited {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--off-white);
}

/* ---------- spreadsheet import ---------- */

.modal-wide {
  width: min(900px, 100%);
}

.imp-lead {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.imp-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 28px;
  border: 2px dashed var(--line);
  border-radius: 10px;
  background: var(--near-black);
  cursor: pointer;
  text-align: center;
}

.imp-drop:hover,
.imp-drop.is-over {
  border-color: var(--teal);
  background: rgba(103, 203, 166, 0.06);
}

.imp-drop.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.imp-drop b {
  font-family: var(--f-display);
  font-size: 15px;
  color: var(--teal);
}

.imp-drop span {
  font-size: 12.5px;
  color: var(--text-faint);
}

.linkish {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  text-decoration: underline;
  font: inherit;
}

.imp-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.imp-lookup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--near-black);
}

.imp-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.imp-progress[hidden] {
  display: none;
}

.imp-bar {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--surface-hi);
  overflow: hidden;
}

.imp-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--teal);
  transition: width 0.2s ease;
}

.imp-count {
  font-size: 12px;
  color: var(--text-dim);
  min-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.imp-table-wrap {
  max-height: 320px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.imp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.imp-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 8px 10px;
  text-align: left;
  background: var(--near-black);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.imp-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.imp-table tr:last-child td {
  border-bottom: 0;
}

.imp-table tr.is-missing {
  background: rgba(232, 184, 119, 0.06);
}

.imp-num,
.imp-loc {
  font-variant-numeric: tabular-nums;
  color: var(--text-faint);
}

.imp-missing {
  color: #e8b877;
}

.imp-tag {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(103, 203, 166, 0.16);
  color: var(--teal);
  font-size: 10px;
}

.imp-table .rating {
  padding: 2px 6px;
}

.imp-table .rating b {
  font-size: 13px;
}

.imp-done b {
  display: block;
  font-family: var(--f-display);
  font-size: 17px;
  color: var(--teal);
  margin-bottom: 4px;
}

.imp-done p {
  margin: 0 0 6px;
  color: var(--text-dim);
  font-size: 13px;
}

.imp-matched {
  display: block;
  font-size: 10.5px;
  color: var(--text-faint);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
