/* =====================================================================
   BEDRE SYNLIG: matforslag, bildelesing og kartknapper
   Lastes etter de andre stilfilene, men før fargene i 99-filen.
   ===================================================================== */

/* Skjult for øyet, men lest opp av skjermlesere */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Matforslag ---------- */
.pair-why {
  margin: 0 0 14px;
  padding: 12px 16px;
  background: var(--garnet-soft);
  border-left: 4px solid var(--garnet);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 16px;
  color: var(--ink);
}
.pair-list {
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.pair-list li {
  grid-template-columns: 14px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 4px 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1.5px solid var(--card-line);
  border-radius: var(--r);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.pair-list li:hover {
  border-color: var(--garnet);
  box-shadow: var(--lift);
}
.pair-list li:first-child:has(.pair-score) {
  border-color: var(--garnet);
}
.pair-list .swatch {
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
}
.pair-list li > div {
  min-width: 0;
}
.pair-list .link.serif {
  font-family: var(--title);
  font-size: 20px;
  line-height: 1.2;
}
.pair-list p {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink);
}
.pair-score {
  grid-column: 2;
  justify-self: start;
  align-self: start;
  height: auto;
  line-height: 1.4;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--garnet-soft);
  color: var(--pink-ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.pair-list li:first-child .pair-score {
  background: var(--garnet);
  color: #fff;
}
.pair-intro {
  font-size: 17px;
  line-height: 1.55;
  margin: 20px 0 12px;
  color: var(--ink);
}
.pair-form {
  display: block !important;
  margin: 26px 0 8px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1.5px solid var(--card-line);
  border-radius: var(--r);
}
.pair-label {
  display: block;
  margin: 0 0 10px;
  font-family: var(--title);
  font-size: 21px;
  color: var(--ink);
}
.pair-row {
  display: flex;
  gap: 10px;
}
.pair-row .field {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  font-size: 16px;
}
.pair-row .btn {
  min-height: 48px;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .pair-row {
    flex-direction: column;
  }
}

/* ---------- Bildelesing ---------- */
.photo-out {
  display: block !important;
}
.photo-loading {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1.5px solid var(--card-line);
  border-radius: var(--r);
}
.photo-loading .photo-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.photo-loading .spinner {
  flex: none;
}
.photo-read {
  display: grid !important;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 16px;
  background: var(--wash);
  border-radius: var(--r);
  margin-bottom: 18px;
}
.photo-read .photo-thumb {
  width: 110px;
  max-height: 150px;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.photo-read .facts {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 14px;
  font-size: 15px;
}
.photo-read .facts dt {
  color: var(--stone);
}
.photo-read .facts dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.photo-q {
  font-family: var(--title);
  font-weight: 400;
  font-size: 24px;
  margin: 6px 0 8px;
}
.photo-q.liten {
  font-size: 18px;
  margin-top: 20px;
}
.photo-card {
  display: grid !important;
  border-color: var(--garnet) !important;
}
.photo-card.liten {
  border-color: var(--card-line) !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  padding: 12px !important;
}
.photo-card.liten .minimap {
  width: 48px !important;
  height: 40px !important;
}
.photo-card.liten .photo-name {
  font-size: 18px;
}
.photo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.photo-card.liten .photo-actions .btn {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
}
.photo-tips {
  padding: 16px 18px;
  border: 1.5px dashed var(--pink-line);
  border-radius: var(--r);
  background: var(--surface);
  margin-bottom: 14px;
}
.photo-tips ul {
  margin: 8px 0 0;
  padding-left: 20px;
  line-height: 1.6;
}
.photo-foods-h {
  margin: 12px 0 6px;
}
.photo-ask {
  margin: 18px 0 8px;
}
@media (max-width: 760px) {
  .photo-read {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .photo-read .photo-thumb {
    width: 80px;
    max-height: 110px;
  }
  .photo-card.liten {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .photo-card.liten .minimap {
    display: none;
  }
}

/* ---------- Kartet ---------- */
.mapgo select {
  height: 38px;
  padding: 0 34px 0 14px;
  border: 1.5px solid var(--card-line);
  border-radius: 99px;
  background-color: #fff;
  color: var(--ink);
  font: 600 14px var(--sans);
  box-shadow: 0 2px 8px -4px rgba(31, 26, 27, 0.25);
  cursor: pointer;
}
.mapgo select:hover {
  border-color: var(--garnet);
}
/* Prikkene på kartet: litt større, med hvit kant, og en tydelig ring rundt den valgte */
#map circle.jvm-marker {
  filter: drop-shadow(0 1px 1.5px rgba(31, 26, 27, 0.35));
}
#map circle.jvm-marker:hover {
  r: 10px;
}
#map.zoomed circle.jvm-marker {
  r: 5px;
}
#map.zoomed circle.jvm-marker:hover {
  r: 8px;
}
#map circle.jvm-marker.is-sel {
  r: 10px;
}
.legend .swatch {
  width: 14px !important;
  height: 14px !important;
  border-radius: 50%;
}
@media (max-width: 760px) {
  .mapbar {
    flex-wrap: wrap;
  }
  .mapgo select {
    max-width: 52vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  #map circle.jvm-marker.is-sel {
    animation: none;
  }
}
