/* Nyheternas galleri, reaktioner och bildvisning (lightbox). Färger ur Bootstrap-variablerna så att mörkt läge följer med. */

/* ── Galleriet: en stor bild och högst två små (som Svenska Lag). 1 bild = en stor, 2 = bredvid varandra, 3+ = stor överst och två under. ── */
.sn-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0 0 1rem; max-width: 540px; }   /* som Svenska Lag: stor bild 4:3 och två kvadratiska under; bredden begransad, klick oppnar bilden stor */
.sn-tile { position: relative; display: block; padding: 0; border: 0; background: var(--bs-secondary-bg); border-radius: .375rem; overflow: hidden; cursor: zoom-in; line-height: 0; }
.sn-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sn-tile:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.sn-big { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
.sn-small { aspect-ratio: 1 / 1; }
.sn-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.75rem; font-weight: 600; line-height: 1; }

/* ── Reaktionerna ── */
.sn-react { margin: 1rem 0; }
.sn-picker { position: absolute; z-index: 20; top: 100%; left: 0; margin-top: .25rem; display: flex; gap: .25rem; padding: .375rem; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: .5rem; box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .15); }
.sn-picker[hidden] { display: none; }
.sn-emoji { font-size: 1.4rem; line-height: 1; min-width: 44px; min-height: 44px; }
.sn-emoji[aria-pressed="true"] { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); }
.sn-heart[aria-pressed="true"] { font-weight: 600; }

/* ── Lightboxen: helskärm, bläddra med pilar/svep, stäng med Escape eller knappen ── */
.sn-lb { position: fixed; inset: 0; z-index: 10000; /* över cookie-bannern (9999 i Master.cshtml): annars täcker den bildvisningens nedre knappar */ background: rgba(0, 0, 0, .92); color: #fff; display: flex; flex-direction: column; touch-action: pan-y; }
.sn-lb-bar { display: flex; align-items: center; justify-content: space-between; padding: .5rem .75rem; }
.sn-lb-stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 3.25rem; }
.sn-lb-img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
/* Klick på bilden i bildvisningen växlar mellan "passad till skärmen" och originalstorlek (scrolla för att se resten). */
.sn-lb-stage.sn-zoom { overflow: auto; align-items: flex-start; justify-content: flex-start; }
.sn-lb-stage.sn-zoom .sn-lb-img { max-width: none; max-height: none; object-fit: none; cursor: zoom-out; margin: auto; }
.sn-lb-btn { background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 44px; height: 44px; font-size: 1.4rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.sn-lb-btn:hover, .sn-lb-btn:focus-visible { background: rgba(255, 255, 255, .3); outline: 2px solid #fff; }
.sn-lb-prev, .sn-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.sn-lb-prev { left: .5rem; }
.sn-lb-next { right: .5rem; }
.sn-lb-foot { padding: .75rem 1rem 1rem; text-align: center; min-height: 4rem; }
.sn-lb-foot a, .sn-lb-foot button.btn-link { color: #9ec5fe; }
@media (max-width: 575.98px) {
  .sn-lb-stage { padding: 0 .25rem; }
  .sn-lb-prev, .sn-lb-next { top: auto; bottom: .5rem; transform: none; }
  .sn-lb-prev { left: .75rem; } .sn-lb-next { right: .75rem; }
}
body.sn-lb-open { overflow: hidden; }

/* Kommentarerna: platt lista, initialer som avatar. Farger ur Bootstrap-variablerna sa att morkt lage foljer med. */
.sn-c { display: flex; gap: .75rem; padding: .6rem .75rem; margin-bottom: .5rem; background: var(--bs-tertiary-bg); border-radius: .375rem; }
.sn-c-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 600;  object-fit: cover; }
.sn-c-main { min-width: 0; flex: 1 1 auto; }
.sn-c-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.sn-c-deleted .sn-c-body { opacity: .6; text-decoration: line-through; }
.sn-c-pending { background: var(--bs-warning-bg-subtle); }
.sn-c-name { color: var(--bs-link-color); }
.sn-c-compose textarea { resize: none; overflow-y: auto; min-height: 38px; }
.sn-c-compose .btn { flex: 0 0 auto; }
.sn-meta i { margin-right: .15rem; }
.sn-c-actions .btn-link { text-decoration: none; min-height: 32px; }

/* Bilder i nyhetens text (infogade med Infoga bild): samma regler som textblocken (.site-text i theme.css) men med tak, sa att en bild aldrig fyller hela sidan. Galler klubbens och kretsens nyheter. */
.site-post-body img { max-width: 100%; height: auto; }
.site-post-body figure.image { display: table; max-width: min(100%, 540px); margin: 1rem auto; }
.site-post-body figure.image img { display: block; width: 100%; height: auto; }
.site-post-body figure.image-style-align-left { float: left; margin: .25rem 1.5rem 1rem 0; max-width: min(60%, 360px); }
.site-post-body figure.image-style-align-right { float: right; margin: .25rem 0 1rem 1.5rem; max-width: min(60%, 360px); }
.site-post-body figure.image-style-block-align-left { margin-left: 0; margin-right: auto; }
.site-post-body figure.image-style-block-align-right { margin-left: auto; margin-right: 0; }
.site-post-body::after { content: ''; display: block; clear: both; }
@media (max-width: 575.98px) {
  .site-post-body figure.image-style-align-left, .site-post-body figure.image-style-align-right { float: none; max-width: 100%; margin: 1rem auto; }
}
