/* ======================================================================
   LEPIBASE — AKTUÁLNE V LEPIBASE
   Public overview
   ====================================================================== */


/* ======================================================================
   PAGE
   ====================================================================== */

.current-overview {
  padding-bottom: var(--lp-space-20);
}

.current-overview__section {
  padding-block: var(--lp-space-16);
}

.current-overview__section + .current-overview__section {
  border-top: 1px solid var(--lp-color-border);
}

.current-overview__section-header {
  display: grid;
  max-width: 54rem;

  gap: var(--lp-space-2);
}

.current-overview__section-header .lp-h2 {
  max-width: 24ch;
}

.current-overview__section-header > .lp-meta {
  max-width: 64ch;
}

.current-overview .lp-species-tile__media {
  aspect-ratio: 3 / 2;
}

/* ======================================================================
   INTRO
   ====================================================================== */
.current-overview__intro {
  display: grid;

  max-width: 58rem;

  padding-block:
    var(--lp-space-10)
    var(--lp-space-8);

  gap: var(--lp-space-3);
}

.current-overview__title {
  max-width: 13ch;
}

.current-overview__lead {
  margin-top: var(--lp-space-2);
}


/* ======================================================================
   CURRENT SEASON
   ====================================================================== */

.current-overview__season {
  padding-top: var(--lp-space-12);
}

.current-overview__season-stats {
  --lp-stat-count: 3;

  max-width: 68rem;

  margin-top: var(--lp-space-8);
}

.current-overview__season-stats .lp-stat {
  padding-block: var(--lp-space-6);
}

.current-overview__season-stats .lp-stat__value {
  font-family: var(--lp-font-display);
  font-size: clamp(2.25rem, 3.4vw, 3.25rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.current-overview__data-note {
  max-width: 58rem;
  margin-top: var(--lp-space-5);
}


/* ======================================================================
   LAST 30 DAYS
   ====================================================================== */

.current-overview__recent {
  padding-top: var(--lp-space-12);
}

.current-overview__recent-stats {
  --lp-stat-count: 2;

  width: min(100%, 38rem);

  margin-top: var(--lp-space-6);
}

.current-overview__recent-stats .lp-stat {
  padding:
    var(--lp-space-4)
    var(--lp-space-5);
}

.current-overview__recent-stats .lp-stat__value {
  font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}


/* ======================================================================
   RECENT ACTIVITY MAP
   ====================================================================== */

.current-overview__map-section {
  margin-top: var(--lp-space-12);
}

.current-overview__map-header {
  display: grid;

  max-width: 52rem;
  margin-bottom: var(--lp-space-5);

  gap: var(--lp-space-2);
}

.current-overview__map {
  position: relative;
  z-index: 0;

  width: 100%;
  min-height: 36rem;

  overflow: hidden;

  border: 1px solid var(--lp-color-border);
  border-radius: var(--lp-radius-panel);

  background:
    linear-gradient(
      135deg,
      var(--lp-color-surface-soft),
      var(--lp-color-background)
    );
}

.current-overview__map::before {
  position: absolute;

  top: 50%;
  left: 50%;

  width: min(44rem, 74%);
  height: 42%;

  border:
    1px dashed
    color-mix(
      in srgb,
      var(--lp-color-border) 82%,
      transparent
    );

  border-radius: 48% 52% 45% 55% / 52% 47% 53% 48%;

  transform:
    translate(-50%, -50%)
    rotate(-2deg);

  opacity: 0.55;

  content: "";
  pointer-events: none;
}

/*
 * Keď Leaflet v ďalšom bloku vloží svoj obsah,
 * dekoratívny placeholder už nemá byť viditeľný.
 */
.current-overview__map:has(.leaflet-map-pane)::before {
  display: none;
}

.current-overview__map .leaflet-tile-pane {
  filter:
    saturate(0.25)
    contrast(0.86)
    brightness(1.1);
}

.current-overview__map-note {
  max-width: 68rem;

  margin-top: var(--lp-space-4);
}


/* ======================================================================
   SPECIES SECTIONS
   ====================================================================== */

.current-overview__species-section {
  padding-block:
    var(--lp-space-16)
    var(--lp-space-20);
}

.current-overview__species-grid {
  padding-block: 0;

  margin-top: var(--lp-space-8);
}

.current-overview__species-tile {
  min-width: 0;
}

.current-overview__species-tile
.lp-species-tile__media {
  box-shadow: none;
}

.current-overview__species-tile
.lp-species-tile__meta {
  font-variant-numeric: tabular-nums;
}

.current-overview__species-section--frequent
.current-overview__species-tile
.lp-species-tile__meta {
  color: var(--lp-color-text-secondary);
  font-weight: 650;
}

.current-overview__empty-note {
  max-width: 44rem;

  margin-top: var(--lp-space-6);
}


/* ======================================================================
   CLOSING CONTINUATION
   ====================================================================== */

.current-overview__continuation {
  display: grid;

  grid-template-columns:
    minmax(0, 1fr)
    auto;

  align-items: end;
  gap: var(--lp-space-10);

  padding-block:
    var(--lp-space-16)
    var(--lp-space-20);
}

.current-overview__continuation-copy {
  display: grid;

  max-width: 48rem;

  gap: var(--lp-space-2);
}

.current-overview__continuation-copy .lp-h2 {
  max-width: 22ch;
}

.current-overview__continuation-actions {
  display: flex;
  flex-wrap: wrap;

  align-items: center;
  justify-content: flex-end;

  gap: var(--lp-space-3);
}


/* ======================================================================
   RESPONSIVE — INTERMEDIATE
   ====================================================================== */

@media (max-width: 80rem) {

  .current-overview__map {
    min-height: 32rem;
  }
}


@media (max-width: 64rem) {

  .current-overview__intro {
    padding-bottom: var(--lp-space-12);
  }

  .current-overview__section {
    padding-block: var(--lp-space-12);
  }

  .current-overview__map {
    min-height: 28rem;
  }

  .current-overview__continuation {
    grid-template-columns: 1fr;

    align-items: start;
    gap: var(--lp-space-6);
  }

  .current-overview__continuation-actions {
    justify-content: flex-start;
  }
}


/* ======================================================================
   RESPONSIVE — MOBILE
   ====================================================================== */

@media (max-width: 44rem) {

  .current-overview {
    padding-bottom: var(--lp-space-12);
  }

  .current-overview__intro {
    padding-block:
      var(--lp-space-8)
      var(--lp-space-10);
  }

  .current-overview__section {
    padding-block:
      var(--lp-space-10)
      var(--lp-space-12);
  }

  .current-overview__season {
    padding-top: var(--lp-space-8);
  }

  /*
   * Na mobile majú tri sezónne čísla zostať
   * editorialne čitateľné, nie stlačené do 2 + 1 gridu.
   */
  .current-overview__season-stats {
    grid-template-columns: 1fr;
  }

  .current-overview__season-stats .lp-stat {
    padding:
      var(--lp-space-5)
      0;
  }

  .current-overview__season-stats .lp-stat + .lp-stat {
    border-top: 1px solid var(--lp-color-border);
    border-left: 0;
  }

  .current-overview__season-stats
  .lp-stat:nth-child(odd) {
    border-left: 0;
  }

  .current-overview__season-stats
  .lp-stat:nth-child(n + 3) {
    border-top: 1px solid var(--lp-color-border);
  }

  .current-overview__season-stats .lp-stat__value {
    font-size: clamp(2.25rem, 11vw, 3rem);
  }

  /*
   * Dve 30-dňové hodnoty môžu zostať vedľa seba.
   */
  .current-overview__recent-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .current-overview__recent-stats .lp-stat {
    padding:
      var(--lp-space-4)
      var(--lp-space-3);
  }

  .current-overview__recent-stats
  .lp-stat:nth-child(2) {
    border-top: 0;
    border-left: 1px solid var(--lp-color-border);
  }

  .current-overview__map-section {
    margin-top: var(--lp-space-10);
  }

  .current-overview__map {
    min-height: 22rem;
  }

  .current-overview__species-section {
    padding-block: var(--lp-space-12);
  }

  .current-overview__species-grid {
    margin-top: var(--lp-space-6);

    gap:
      var(--lp-space-8)
      var(--lp-space-4);
  }

  .current-overview__continuation {
    padding-block:
      var(--lp-space-12)
      var(--lp-space-16);
  }

  .current-overview__continuation-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .current-overview__continuation-actions
  .lp-button {
    width: 100%;
  }
}

/* Sezónne prvenstvá: štádium, dátum a okresy. */
.current-overview__species-section--new
.lp-species-tile__media {
  position: relative;
}

.current-overview .current-overview__first-meta {
  display: block;
  margin-top: 0.5rem;
  color: var(--lp-color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.current-overview__first-meta time {
  white-space: nowrap;
}

.current-overview__first-meta time
+ .current-overview__first-districts::before {
  content: " · ";
}

@media (max-width: 44rem) {
  .current-overview .current-overview__first-districts {
    display: block;
  }

  .current-overview__first-meta time
  + .current-overview__first-districts::before {
    content: none;
  }
}

/* Kompaktný úvod a poradie schváleného prehľadu. */
.current-overview__opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 1.5rem 3rem;
  padding-block: var(--lp-space-10) var(--lp-space-8);
  border-bottom: 1px solid var(--lp-color-border);
}

.current-overview__opening > .current-overview__intro {
  min-width: 0;
  max-width: none;
  padding: 0;
}

.current-overview__opening .current-overview__title {
  max-width: none;
}

.current-overview__opening > .current-overview__season {
  min-width: 0;
  padding: 0.5rem 0 0;
}

.current-overview__season > .current-overview__section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.current-overview__season
> .current-overview__section-header > * {
  margin: 0;
}

.current-overview__season-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 1.5rem;
}

.current-overview__season-stats .lp-stat {
  min-width: 0;
  padding: 0 1rem;
  border: 0;
}

.current-overview__season-stats .lp-stat:first-child {
  padding-left: 0;
}

.current-overview__season-stats .lp-stat + .lp-stat {
  border-left: 1px solid var(--lp-color-border);
}

.current-overview__season-stats .lp-stat__value {
  font-size: clamp(1.75rem, 2.8vw, 2.75rem);
}



.current-overview__species-section--new
> .current-overview__species-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.current-overview__species-tile .lp-species-tile__name,
.current-overview__species-tile .lp-species-tile__sk {
  overflow-wrap: anywhere;
}

@media (max-width: 64rem) {
  .current-overview__opening {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .current-overview__opening > .current-overview__season {
    padding-top: 0;
  }
}

@media (max-width: 44rem) {
  .current-overview__opening {
    padding-block: var(--lp-space-8);
  }

  .current-overview__species-section--new
  > .current-overview__species-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .current-overview__season-stats .lp-stat {
    padding: 0 0.65rem;
    border-top: 0;
    border-left: 0;
  }

  .current-overview__season-stats .lp-stat:first-child {
    padding-left: 0;
  }

  .current-overview__season-stats .lp-stat + .lp-stat {
    border-top: 0;
    border-left: 1px solid var(--lp-color-border);
  }

  .current-overview__season-stats .lp-stat__value {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

/* Najčastejšie druhy: kompaktný zoznam s fotografiami. */
.current-overview__species-section--frequent
> .current-overview__species-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 2.5rem;
}

.current-overview__species-section--frequent
.current-overview__species-tile {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  grid-template-rows: 1fr 1fr;
  align-items: center;
  gap: 0.15rem 0.875rem;
  min-width: 0;
  padding-block: 0.875rem;
  border-top: 1px solid var(--lp-color-border);
}

.current-overview__species-section--frequent
.lp-species-tile__media {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 100px;
  height: 70px;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border-radius: 0.25rem;
}

.current-overview__species-section--frequent
.lp-species-tile__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-overview__species-section--frequent
.lp-species-tile__name {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  min-width: 0;
  margin: 0;
  line-height: 1.35;
}

.current-overview__species-section--frequent
.lp-species-tile__sk {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  min-width: 0;
  margin: 0;
  line-height: 1.4;
}

.current-overview__species-section--frequent
.lp-species-tile__meta {
  grid-column: 3;
  grid-row: 1 / 3;
  margin: 0;
  text-align: right;
  white-space: nowrap;
  font-size: 0.8125rem;
}

.current-overview__species-section--frequent
.lp-media-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0.25rem;
}

.current-overview__species-section--frequent
.lp-media-placeholder__mark {
  display: none;
}

.current-overview__species-section--frequent
.lp-media-placeholder__text {
  font-size: 0.6875rem;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 44rem) {
  .current-overview__species-section--frequent
  > .current-overview__species-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .current-overview__species-section--frequent
  .current-overview__species-tile {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    column-gap: 0.625rem;
  }

  .current-overview__species-section--frequent
  .lp-species-tile__media {
    width: 76px;
    height: 56px;
  }
}

/* Posledných 30 dní: nadpis a štatistiky vedľa seba. */
.current-overview__recent {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 0 2.5rem;
}

.current-overview__recent
> .current-overview__section-header {
  min-width: 0;
}

.current-overview__recent
> .current-overview__recent-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
}

.current-overview__recent-stats .lp-stat {
  min-width: 0;
  padding: 0 1.25rem;
  border: 0;
}

.current-overview__recent-stats .lp-stat:first-child {
  padding-left: 0;
}

.current-overview__recent-stats .lp-stat + .lp-stat {
  border-top: 0;
  border-left: 1px solid var(--lp-color-border);
}

.current-overview__recent
> .current-overview__map-section {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 2rem;
}

@media (max-width: 44rem) {
  .current-overview__recent {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }

  .current-overview__recent
  > .current-overview__map-section {
    margin-top: 0;
  }

  .current-overview__recent-stats .lp-stat {
    padding: 0 0.875rem;
  }

  .current-overview__recent-stats .lp-stat:first-child {
    padding-left: 0;
  }
}

/* Štádium prvenstva mimo fotografie. */
.current-overview .current-overview__first-stage {
  display: block;
  margin-top: 0.125rem;
  color: var(--lp-color-text-secondary);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.4;
}

/* Úvod: bez vodorovných čiar pri sezónnych číslach. */
.current-overview .current-overview__season-stats {
  border-top: 0;
  border-bottom: 0;
}

/* Desktop: sezóna začína v rovnakom riadku ako hlavný nadpis. */
@media (min-width: 64.001rem) {
  .current-overview .current-overview__opening {
    row-gap: var(--lp-space-3);
  }

  .current-overview__opening > .current-overview__intro {
    grid-column: 1;
    grid-row: 1 / 4;
    grid-template-rows: subgrid;
  }

  .current-overview__opening > .current-overview__season {
    grid-column: 2;
    grid-row: 2 / 4;
    align-self: start;
    padding-top: 0;
  }
}

/* Širšie nadpisy; odseky si zachovajú čitateľnú šírku. */
.current-overview
.current-overview__species-section
> .current-overview__section-header {
  max-width: none;
}

.current-overview
.current-overview__species-section
> .current-overview__section-header .lp-h2 {
  max-width: none;
}

/* Menší mapový blok vrátane jeho rámu a poznámky. */
.current-overview .current-overview__map-section {
  width: 100%;
  max-width: 64rem;
  justify-self: center;
  margin-inline: auto;
}

.current-overview .current-overview__map {
  width: 100%;
  height: 480px;
  min-height: 0;
  background: #f1f2f2;
}

.current-overview .current-overview__map::before {
  display: none;
}

.current-overview .current-overview__map-note {
  max-width: none;
}

.current-overview .current-overview__method-note {
  margin: 0;
  padding-block: 0 var(--lp-space-8);
  max-width: none;
}

.current-overview
.current-overview__method-note
+ .current-overview__continuation {
  border-top: 1px solid var(--lp-color-border);
}

@media (max-width: 44rem) {
  .current-overview .current-overview__map {
    height: clamp(200px, 48vw, 320px);
  }
}

/* Kompaktný doplnkový prehľad súčtu jedincov. */
.current-overview__individuals {
  padding-bottom: var(--lp-space-10);
}

.current-overview__individuals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.current-overview__individual {
  display: grid;
 grid-template-columns: 130px minmax(0, 1fr);
  align-items: start;
  gap: 0.875rem;
  min-width: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--lp-color-border);
  color: inherit;
  text-decoration: none;
}

.current-overview__individual-media {
  width: 130px;
  height: 90px;
  overflow: hidden;
  border-radius: 0.25rem;
  background: var(--lp-color-surface-soft);
}

.current-overview__individual-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-overview__individual-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: 0.25rem;
  color: var(--lp-color-text-secondary);
  font-size: 0.6875rem;
  text-align: center;
}

.current-overview__individual-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.current-overview__individual-lat {
  font-family: var(--lp-font-display);
  font-style: italic;
  font-weight: 650;
  line-height: 1.35;
}

.current-overview__individual-sk {
  color: var(--lp-color-text-secondary);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.current-overview__individual-total {
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.current-overview__individual-total strong {
  margin-right: 0.25rem;
  font-size: 1.375rem;
}

.current-overview__individual:hover
.current-overview__individual-lat {
  text-decoration: underline;
}

@media (max-width: 64rem) {
  .current-overview__individuals-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
}
