/**
 * Checkpoint Page Layout Safety
 *
 * Loaded after checkpoint_v2.optimized.min.css. Contains only word-wrap and
 * min-width safety rules — no visual redesign. The master fix (white-space
 * reset for V3 no-tabs) lives inline in prognoza11.php; this file catches
 * remaining narrow-width cases (long Cyrillic words, hyphenated phone
 * numbers, grid/flex shrink edges).
 */

/* ---------- Card text: never blow past the card's edge ---------- */
.checkpoint-v2 .v2-card,
.checkpoint-v2 .v2-card *,
.checkpoint-v2 .nk-card,
.checkpoint-v2 .nk-card *,
.checkpoint-v2 .v2-nearby,
.checkpoint-v2 .v2-nearby *,
.checkpoint-v2 .nk-grid,
.checkpoint-v2 .nk-grid * {
  min-width: 0;
}

/* ---------- Nearby-checkpoint slot row: let slots wrap when narrow ---------- */
.checkpoint-v2 .v2-nearby__slots {
  flex-wrap: wrap;
}
.checkpoint-v2 .v2-nearby__slot {
  min-width: 0;
  flex: 1 1 140px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkpoint-v2 .v2-card__content,
.checkpoint-v2 .v2-card__content *,
.checkpoint-v2 .nk-card *,
.checkpoint-v2 .opinions-ai-summary,
.checkpoint-v2 .v2-info-box,
.checkpoint-v2 .v2-info-box *,
.checkpoint-v2 .forecast-analysis,
.checkpoint-v2 .analysis-content,
.checkpoint-v2 .analysis-content * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Mini-card lists (prohibited items, contacts, services) ---------- */
.checkpoint-v2 .v2-mini-card,
.checkpoint-v2 .v2-list,
.checkpoint-v2 .v2-list li,
.checkpoint-v2 .v2-list li * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* Phone numbers (e.g. "0-800-503-508", "PZM 19-637") are unbreakable
   tokens that overflow narrow contact cards — let the browser break them. */
.checkpoint-v2 .v2-list--contacts li,
.checkpoint-v2 .v2-list--contacts li * {
  word-break: break-all;
  overflow-wrap: anywhere;
}

/* ---------- Long Cyrillic words like "БУДЬ-ЯКА", "Продукти..." ---------- */
.checkpoint-v2 .v2-list--danger li,
.checkpoint-v2 .v2-list--danger li *,
.checkpoint-v2 .v2-mini-card--danger,
.checkpoint-v2 .v2-mini-card--danger * {
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
}

/* ---------- Headings inside cards must wrap, not extrude ---------- */
.checkpoint-v2 .v2-card h1,
.checkpoint-v2 .v2-card h2,
.checkpoint-v2 .v2-card h3,
.checkpoint-v2 .v2-card h4,
.checkpoint-v2 .nk-card h1,
.checkpoint-v2 .nk-card h2,
.checkpoint-v2 .nk-card h3,
.checkpoint-v2 .nk-card h4 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- News card description column (Bootstrap col-md-10/col-9) ---------- */
.checkpoint-v2 .nk-reviews-news .container .row > [class*="col-"],
.checkpoint-v2 .nk-reviews-news .container .row > [class*="col-"] * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Weather widget (compact column, German/Polish names) ---------- */
.checkpoint-v2 .nk-weather,
.checkpoint-v2 .full-weather-widget,
.checkpoint-v2 .full-weather-widget * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Sticky ToC: must shrink horizontally on narrow screens ---------- */
.checkpoint-v2 .v2-toc,
.checkpoint-v2 .v2-toc * {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Breadcrumb: long checkpoint names should wrap, not scroll ---------- */
.checkpoint-v2 .breadcrumb,
.checkpoint-v2 .breadcrumb li {
  flex-wrap: wrap;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ---------- Footer grid: prevent 8px column-sum overflow ---------- */
.v2-footer__container,
.v2-footer__grid,
.v2-footer__section,
.v2-footer__links {
  min-width: 0;
}
.v2-footer__section,
.v2-footer__section * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Stats-by-day card: contains a wide chart that the chart's
   own internal scroller should handle — keep the card edge clean. ---------- */
.checkpoint-v2 .nk-stats-by-day,
.checkpoint-v2 .nk-stats-by-day > * {
  max-width: 100%;
  min-width: 0;
}
.checkpoint-v2 .nk-stats-by-day p,
.checkpoint-v2 .nk-stats-by-day h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Forecast section / smart-chart wrapper ---------- */
.checkpoint-v2 .nkd-smart-chart,
.checkpoint-v2 .forecast-section,
.checkpoint-v2 .forecast-container {
  max-width: 100%;
  min-width: 0;
}

/* ---------- Map / contact card body ---------- */
.checkpoint-v2 .nk-more-contact-map,
.checkpoint-v2 .nk-more-contact-map * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Footer copyright row: long source list should wrap ---------- */
.v2-footer__bottom,
.v2-footer__bottom * {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Forecast strip: hard-coded width must defer to parent ---------- */
.checkpoint-v2 .v2-forecast-scroll {
  width: 100% !important;
  max-width: 100%;
}

/* ---------- Bootstrap `.row` negative side-margins inside cards ---------- */
.checkpoint-v2 .v2-card .row,
.checkpoint-v2 .nk-card .row {
  margin-left: 0;
  margin-right: 0;
}
.checkpoint-v2 .v2-card .row > [class*="col-"],
.checkpoint-v2 .nk-card .row > [class*="col-"] {
  padding-left: 8px;
  padding-right: 8px;
}

/* ---------- Cards themselves: clip stray negative margins ---------- */
.checkpoint-v2 .v2-card,
.checkpoint-v2 .nk-card {
  overflow-x: clip;
}

/* ---------- Don't break inside intentional one-liners (badges, status chips) ---------- */
.checkpoint-v2 .v2-badge,
.checkpoint-v2 .v2-status-chip,
.checkpoint-v2 .v2-tag,
.checkpoint-v2 .v2-pill {
  word-break: keep-all;
  overflow-wrap: normal;
}
