/* The interactive vineyard map on vineyards.html (Wiam, 13 Nov 2026).
   The drawing (assets/img/vineyard-map/map.jpg) is painted on Vintage Cream,
   the page's own ground, so the map sits on the page with no frame. The
   legend sits in the drawing's empty bottom-right corner and is sized in
   container units so it scales with the drawing; below 700px it drops under
   the map. Behaviour: js/vineyard-map.js. */
.vmap { position: relative; container-type: inline-size; margin-top: var(--space-3); }
.vmap svg { display: block; width: 100%; height: auto; }

.vmap-blk { fill: rgba(0, 0, 0, 0); stroke: none; cursor: pointer; transition: fill-opacity .15s var(--ease-lux); }
.vmap-blk:focus { outline: none; }
/* the one highlight: js/vineyard-map.js gives it the outline of the block in
   focus; it never takes the pointer, so the block under it keeps its events */
.vmap-hl {
  fill: rgba(255, 252, 223, .2); pointer-events: none;
  stroke: var(--parchment); stroke-width: 6; stroke-linejoin: round;
}
.vmap-blk.dim {
  fill: var(--parchment) !important; fill-opacity: .72;
  stroke: var(--parchment); stroke-width: 6; stroke-opacity: .72; stroke-linejoin: round;
}

.vmap-legend {
  position: absolute; left: 53.6%; bottom: 3.6%;
  list-style: none; margin: 0; padding: 0;
  font-family: var(--font-display); font-size: 1.78cqw; color: var(--ink);
}
.vmap-legend li {
  display: flex; align-items: center; gap: 2.1cqw;
  height: var(--vmap-row, 4.95cqw); padding-right: 1cqw; cursor: default;
}
.vmap-legend li:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 2px; }
.vmap-ic { width: 5.4cqw; height: calc(var(--vmap-row, 4.95cqw) - .5cqw); flex: none; display: flex; align-items: center; justify-content: center; }
.vmap-ic img { max-width: 100%; max-height: 100%; }
.vmap-nm { text-transform: uppercase; letter-spacing: .04em; line-height: 1; }
.vmap-legend li.on .vmap-nm { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .2em; }

.vmap-hint { text-align: center; margin-top: var(--space-2); }

/* the card: follows the pointer on a desktop, docks at the bottom on a phone */
.vmap-card {
  position: fixed; z-index: 145; pointer-events: none; width: 300px;
  background: var(--parchment); border: 1px solid var(--gold); box-shadow: var(--shadow-lift);
  padding: 1rem 1.1rem .9rem; color: var(--ink);
  opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.vmap-card.show { opacity: 1; transform: none; }
.vmap-card-top {
  display: flex; align-items: center; gap: .75rem;
  border-bottom: 1px solid var(--rule); padding-bottom: .6rem; margin-bottom: .6rem;
}
.vmap-card-top img { width: 44px; height: auto; flex: none; }
.vmap-block, .vmap-card dt, .vmap-chip, .vmap-close {
  font-family: var(--font-text); font-size: .68rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
}
.vmap-block { color: var(--text-label); }
.vmap-cv { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: .04em; text-transform: uppercase; line-height: 1.15; margin-top: 2px; }
.vmap-card dl { display: grid; grid-template-columns: auto 1fr; gap: .3rem .9rem; margin: 0; }
.vmap-card dt { color: var(--ink-soft); line-height: 2.1; }
.vmap-card dd { margin: 0; text-align: right; font-family: var(--font-display); font-size: 1.05rem; }
.vmap-chip { display: inline-block; margin-top: .75rem; padding: .3rem .55rem; border: 1px solid var(--gold); color: var(--gold-text); }
.vmap-close { display: none; }

@container (max-width: 700px) {
  .vmap-legend {
    position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 1rem;
    font-size: 1rem; padding: .9rem 0 .4rem; --vmap-row: 40px;
  }
  .vmap-legend li { gap: .75rem; }
  .vmap-ic { width: 40px; }
}
@media (max-width: 420px) { .vmap-legend { grid-template-columns: 1fr !important; } }
@media (hover: none), (max-width: 560px) {
  .vmap-card {
    left: 8px !important; right: 8px; top: auto !important; width: auto; pointer-events: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .vmap-card-top { padding-right: 4.5rem; }
  .vmap-close {
    display: block; position: absolute; right: .6rem; top: .75rem;
    appearance: none; background: none; border: 1px solid var(--gold); color: var(--ink);
    padding: .35rem .55rem; cursor: pointer;
  }
}
@media (prefers-reduced-motion: reduce) { .vmap-card, .vmap-blk { transition: none; } }
