/* Villa page: builds on the Cup's Riviera styles (cup.css), like Stroški.
   Photo, weather, facts, amenities, route, final votes and the archived comparison. */
/* Phone: one column. Laptop and TV: like the Cup, two columns up to 1480px. */
.wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
.wrap > * { min-width: 0; }
.wrap > section + section, .wrap > section + div, .wrap > div + section, .s-side > section + section { margin-top: 34px; }
.wrap [hidden] { display: none !important; }
.bar-r { display: inline-flex; align-items: center; gap: 14px; }
.bar > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--ink); }

/* Hero */
.status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px; margin-top: 20px; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px; border-radius: 99px; font-size: 14px; font-weight: 600;
  background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 28%, transparent); }
.pill i { font-size: 17px; }
.status .when { font-size: 15px; color: var(--text); }

/* Photo */
.photo { margin-top: 0; }
.photo-main { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); background: var(--hair); cursor: zoom-in; }
.photo-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .photo-main:hover img { transform: scale(1.02); } }
.photo-main span { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 99px;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--glass-heavy); border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.photo-main span i { font-size: 16px; color: var(--lagoon); }
.thumbs { display: flex; gap: 8px; margin: 10px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter) 2px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: 0 0 66px; height: 66px; border-radius: 14px; overflow: hidden; scroll-snap-align: start; background: var(--hair); transition: transform 140ms var(--ease-out); }
.thumbs button:active { transform: scale(0.96); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Weather */
.wx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wx .d { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 16px 6px 14px; text-align: center; }
.wx .d + .d { box-shadow: -1px 0 0 var(--hair); }
.wx .day { font-size: 13px; font-weight: 600; color: var(--text); }
.wx i { font-size: 30px; color: var(--lagoon); margin: 4px 0 2px; }
.wx i.sunny { color: var(--gold); }
.wx .t { font-family: var(--serif); font-size: 30px; line-height: 1; }
.wx .t small { font-family: var(--sans); font-size: 13px; color: var(--muted); margin-left: 2px; }
.wx .l { font-size: 12px; color: var(--muted); line-height: 1.3; }
.wx-empty { padding: 18px 16px; color: var(--muted); }

/* Facts and amenity rows */
.row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 66px; padding: 11px 16px; text-align: left; color: var(--ink); }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-main small { font-size: 13px; color: var(--muted); }
.row-main b { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.row-main span { font-size: 14px; color: var(--text); }
.row .chev { font-size: 18px; color: var(--muted); }
button.row { transition: background-color 160ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { button.row:hover { background: var(--lagoon-soft); } }
.rows > :first-child { border-radius: 20px 20px 0 0; } .rows > :last-child { border-radius: 0 0 20px 20px; }
.go { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

/* Route */
.map-surf { overflow: hidden; padding: 0; }
#map { height: 340px; background: var(--hair); z-index: 0; }
.leaflet-container { font-family: var(--sans); }
.leaflet-container .leaflet-control-attribution { font-size: 10px; background: var(--glass-heavy); color: var(--muted); }
.leaflet-container .leaflet-control-attribution a { color: var(--text); }
.leaflet-bar { border: 1px solid var(--hair) !important; box-shadow: none !important; border-radius: 12px !important; overflow: hidden; }
.leaflet-bar a, .leaflet-bar a:hover { background: var(--bg-solid); color: var(--ink); border-color: var(--hair); }
.pin { display: inline-block; transform: translate(-50%, calc(-100% - 6px)); white-space: nowrap; padding: 6px 12px; border-radius: 99px;
  background: var(--lagoon); color: var(--on-lagoon); font: 600 13px/1.2 var(--sans); box-shadow: 0 4px 14px rgba(13, 58, 67, 0.25); }
.pin::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: inherit; transform: rotate(45deg); border-radius: 0 0 2px 0; z-index: -1; }
.pin.origin { background: var(--bg-solid); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink), 0 4px 14px rgba(13, 58, 67, 0.15); }

/* Final votes, styled like the Cup standings */
.vr { position: relative; display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 10px 16px 10px 12px; }
.vr .rk { width: 26px; flex: none; text-align: center; font-family: var(--serif); font-size: 24px; color: var(--muted); }
.vr .rk i { font-size: 22px; color: var(--gold); }
.vr img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; }
.vr .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.vr .who b { font-weight: 600; }
.vr .who span { font-size: 13px; color: var(--muted); }
.vr .n { font-family: var(--serif); font-size: 38px; line-height: 1; }
.vr.won { background: linear-gradient(90deg, var(--gold-soft), transparent 65%); }
.vr.won .n { color: var(--gold); }
.vr.zero { color: var(--muted); }
.vr.zero img { opacity: 0.55; }
.vr.zero .n { color: var(--muted); }

/* Archive: the comparison we decided with */
details.arch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 66px; border-radius: 20px; }
details.arch > summary::-webkit-details-marker { display: none; }
details.arch > summary .chev { margin-left: auto; font-size: 18px; color: var(--muted); transition: transform 240ms var(--ease-out); }
details.arch[open] > summary .chev { transform: rotate(180deg); }
details.arch[open] > summary { border-radius: 20px 20px 0 0; box-shadow: 0 1px 0 var(--hair); }
.arch-in { padding: 14px 0 6px; }
.arch-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--hair); background: var(--bg);
  color: var(--text); font-size: 14px; font-weight: 500; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.chip small { font-size: 12px; opacity: 0.7; }
.chip[aria-pressed="true"] { background: var(--lagoon); border-color: var(--lagoon); color: var(--on-lagoon); }
.arch-meta { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px 0; font-size: 13px; color: var(--muted); }
.arch-meta button { color: var(--lagoon); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 8px 16px 0; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i, .v::before { width: 8px; height: 8px; border-radius: 50%; background: var(--lagoon); flex: none; }
.legend .l-no i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.legend .l-ask i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold); }

.cmp-wrap { overflow-x: auto; margin-top: 12px; scrollbar-width: thin; }
.cmp { width: 100%; min-width: calc(96px + var(--n, 8) * 108px); border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 14px; }
.cmp col.lbl { width: 96px; }
.cmp th, .cmp td { padding: 11px 8px; text-align: left; vertical-align: top; box-shadow: 0 -1px 0 var(--hair); }
.cmp thead th { box-shadow: none; padding-top: 4px; vertical-align: bottom; }
.cmp tbody th { position: sticky; left: 0; z-index: 1; padding-left: 16px; background: var(--bg-solid); color: var(--muted); font-weight: 500; font-size: 13px; }
.cmp thead th:first-child { position: sticky; left: 0; z-index: 2; background: var(--bg-solid); }
.head { display: flex; flex-direction: column; gap: 6px; }
.head-photo { position: relative; display: block; width: 100%; border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.head-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.head-photo .n { position: absolute; right: 5px; bottom: 5px; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: rgba(8, 26, 30, 0.6); color: #F3F6F5; font-size: 11px; font-weight: 600; text-align: center; }
.head > span { font-family: var(--serif); font-size: 21px; line-height: 1; }
.cmp tr.gap th, .cmp tr.gap td { height: 14px; padding: 0; }
.v { display: flex; align-items: baseline; gap: 7px; color: var(--ink); font-weight: 600; }
.v::before { content: ""; transform: translateY(-1px); }
.row-basic .v::before { display: none; }
.no .v { color: var(--muted); font-weight: 500; }
.no .v::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.ask .v { color: var(--gold); }
.ask .v::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--gold); }
.big { font-family: var(--serif); font-size: 22px; font-weight: 400; line-height: 1.05; }
.sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.best { display: inline-block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--lagoon); }
.warn { display: inline-grid; place-items: center; flex: none; width: 17px; height: 17px; margin-left: 4px; border-radius: 50%; background: var(--gold); color: var(--bg-solid); font-size: 11px; font-weight: 700; font-style: normal; }
.sub.warn-txt { color: var(--gold); }
.more { display: none; margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--text); }
.more ul { padding-left: 15px; }
.cmp.open .more { display: block; }
.cmp tr.detail { display: none; }
.cmp.open tr.detail { display: table-row; }
.shared td .v { position: sticky; left: 112px; width: max-content; }
.cmp .actions a { color: var(--lagoon); font-weight: 600; }
.empty { padding: 18px 16px; color: var(--muted); }

p.foot { margin-top: 34px; font-size: 13px; color: var(--muted); }
p.foot + p.foot { margin-top: 6px; }

/* Gallery */
dialog.lb { margin: auto; border: 0; padding: 0; background: transparent; width: min(1000px, calc(100vw - 24px)); max-width: none; color: #EAF6F5; }
dialog.lb::backdrop { background: rgba(6, 26, 31, 0.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
dialog.lb img { display: block; width: 100%; max-height: 72vh; object-fit: contain; border-radius: 18px; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.lb-bar p { font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.lb-bar p small { font-family: var(--sans); font-size: 13px; color: rgba(234, 246, 245, 0.6); margin-left: 6px; }
.lb-nav { display: flex; gap: 8px; flex: none; }
.lb-nav button { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; color: #EAF6F5;
  background: rgba(255, 255, 255, 0.1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18); }
.lb-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.lb-pills > * { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 99px; font-size: 13px; font-weight: 600; color: #EAF6F5;
  background: rgba(255, 255, 255, 0.1); }
.lb-pills .fact { background: rgba(95, 192, 216, 0.25); }
.lb-pills .ask { background: transparent; box-shadow: inset 0 0 0 1px rgba(230, 178, 90, 0.8); color: #F1CD8A; }
.lb-pills button.on { background: #EAF6F5; color: #0D3A43; }
.lb-pills a { margin-left: auto; background: #EAF6F5; color: #0D3A43; }

@media (min-width: 700px) {
  :root { --wrap-max: 720px; }
  .wrap { max-width: 720px; }
  #map { height: 400px; }
  .photo-main { aspect-ratio: 16 / 10; }
  .thumbs { margin: 10px 0 0; padding: 0; }
}
@media (min-width: 960px) {
  .wrap { max-width: 1480px; padding: 0 var(--wide-pad) 110px; column-gap: var(--col-gap); align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "bar bar" "head head" "photo side" "amen votes" "map map" "arch arch" "foot foot"; }
  .bar { grid-area: bar; } .s-head { grid-area: head; } .s-photo { grid-area: photo; } .s-side { grid-area: side; }
  .s-amen { grid-area: amen; } .s-votes { grid-area: votes; } .s-map { grid-area: map; } .s-arch { grid-area: arch; } .s-foot { grid-area: foot; }
  h1 { margin-top: 26px; font-size: 84px; }
  .lede { max-width: 32em; }
  /* Photo fills the height of weather + details next to it */
  .s-photo { align-self: stretch; display: flex; flex-direction: column; }
  .photo { flex: 1; display: flex; flex-direction: column; }
  .photo-main { flex: 1; aspect-ratio: auto; min-height: 420px; }
  .thumbs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: visible; }
  .thumbs button { height: auto; aspect-ratio: 1; }
  /* Kaj ima and Glasovi: same height, rows spread to fill */
  .s-amen, .s-votes { align-self: stretch; display: flex; flex-direction: column; }
  #amen, #votes { flex: 1; display: flex; flex-direction: column; }
  #amen > *, #votes > * { flex: 1; }
  #map { height: 480px; }
  .cmp { min-width: 0; }
  .shared td .v { position: static; }
}
@media (max-width: 380px) {
  .wx .t { font-size: 26px; }
  .wx .l { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .photo-main img, details.arch > summary .chev { transition: none; } }
.arch-meta button + button { margin-left: 14px; }
