/* ==========================================================================
   PIK Noc Muzeów — landing page styling (draft + production)
   Używa istniejącego PIK markup .bilet-box, dodaje badge miasta
   ========================================================================== */

/* Hero image — surowe zdjęcie bez overlay tekstu */
.pik-nm-hero-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  margin: 0 0 25px;
}

/* Info banner */
.pik-nm-info {
  padding: 16px 18px;
  background: #fff8e1;
  border-left: 4px solid #e5232a;
  border-radius: 4px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.55;
}

/* Countdown */
.pik-nm-countdown {
  display: flex;
  gap: 10px;
  padding: 22px 16px;
  margin: 25px 0;
  background: linear-gradient(135deg, #e5232a, #ff5a4d);
  border-radius: 12px;
  color: white;
  justify-content: center;
  flex-wrap: wrap;
}
.pik-nm-cd-unit { text-align: center; min-width: 78px; }
.pik-nm-cd-num { font-size: 36px; font-weight: 700; line-height: 1; color: #1a1a1a; }
.pik-nm-cd-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; margin-top: 5px; opacity: 0.95; color: #fff; }

/* TOC */
.pik-nm-toc {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px 20px;
  margin: 22px 0;
}
.pik-nm-toc h3 {
  font-size: 13px;
  text-transform: uppercase;
  color: #b07b00;
  letter-spacing: 1.2px;
  margin: 0 0 10px;
  font-weight: 700;
  border: 0;
}
.pik-nm-toc ol { columns: 2; column-gap: 30px; margin: 0; padding-left: 22px; }
.pik-nm-toc li { padding: 4px 0; break-inside: avoid; }
.pik-nm-toc a { color: #1a1a1a; text-decoration: none; font-size: 14px; }
.pik-nm-toc a:hover { color: #e5232a; text-decoration: underline; }
@media (max-width: 600px) { .pik-nm-toc ol { columns: 1; } }

/* Sekcje */
.pik-nm-section { margin: 35px 0; scroll-margin-top: 70px; }
.pik-nm-section h2 {
  color: #1a1a1a;
  font-size: 24px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 3px solid #e5232a;
  display: inline-block;
}

/* Filtry */
.pik-nm-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  align-items: center;
  padding: 14px;
  background: #f8f9fa;
  border-radius: 8px;
}
.pik-nm-filters strong { font-size: 13px; color: #555; margin-right: 4px; }
.pik-nm-chip {
  padding: 7px 14px;
  background: white;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
  transition: all 0.15s;
}
.pik-nm-chip:hover { background: #f0f0f0; }
.pik-nm-chip.active {
  background: #e5232a;
  color: #1a1a1a;
  border-color: #e5232a;
  font-weight: 600;
}
.pik-nm-chip .count { opacity: 0.7; font-size: 11px; margin-left: 4px; }

/* In-grid ad — full width, separator between event tiles */
.pik-nm-grid-ad {
  grid-column: 1 / -1;
  margin: 8px 0;
  text-align: center;
}
.pik-nm-grid-ad img,
.pik-nm-grid-ad ins {
  max-width: 100%;
  height: auto;
}

/* Lista wydarzeń — używa .bilet-box markup (jak strona /bilety/) — light, fast, separated cards */
.pik-nm-grid.bilety-grid .bilet-box-image {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #f0f0f0;
}
.pik-nm-grid.bilety-grid .bilet-box-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ICS link w buttony (przy "ZOBACZ WIĘCEJ") */
.pik-nm-grid .buttony { display: flex; align-items: center; gap: 10px; }
.pik-nm-grid .buttony ._blox_book_now { flex: 1; }
.pik-nm-grid .pik-nm-ics-link {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: #e5232a;
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
}
.pik-nm-grid .pik-nm-ics-link:hover { color: #e09600; transform: scale(1.15); }
.pik-nm-grid .pik-nm-ics-link .pik-icon { width: 26px; height: 26px; }
.pik-nm-city-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 12px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.pik-nm-city-badge.city-gdansk { background: rgba(255, 243, 217, 0.95); color: #b07b00; }
.pik-nm-city-badge.city-gdynia { background: rgba(217, 238, 255, 0.95); color: #0066b3; }
.pik-nm-city-badge.city-sopot  { background: rgba(255, 224, 230, 0.95); color: #b30040; }
.pik-nm-city-badge.city-inne   { background: rgba(232, 232, 232, 0.95); color: #555; }
/* Tryb district (warszawa): jednolity styl badge z brand color, dla slugów dzielnic */
.pik-nm-city-badge[class*="city-"]:not(.city-gdansk):not(.city-gdynia):not(.city-sopot):not(.city-inne):not(.city-pozostale) { background: rgba(255, 224, 224, 0.95); color: #a01821; }
.pik-nm-city-badge.city-pozostale { background: rgba(232, 232, 232, 0.95); color: #555; }

/* Empty state */
.pik-nm-empty {
  padding: 30px;
  text-align: center;
  color: #777;
  background: #f8f9fa;
  border-radius: 8px;
  grid-column: 1 / -1;
}

/* FAQ */
.pik-nm-faq {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  margin-bottom: 8px;
}
.pik-nm-faq summary {
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  position: relative;
  padding-right: 40px;
}
.pik-nm-faq summary::-webkit-details-marker { display: none; }
.pik-nm-faq summary::after {
  content: '+';
  position: absolute;
  right: 18px;
  top: 14px;
  color: #e5232a;
  font-size: 22px;
  line-height: 1;
}
.pik-nm-faq[open] summary::after { content: '\2212'; }
.pik-nm-faq-a {
  padding: 0 18px 16px;
  color: #444;
  font-size: 14px;
  line-height: 1.55;
}

/* Mapa */
.pik-nm-map {
  height: 480px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #ccc;
  margin-bottom: 12px;
  z-index: 0;
}
.pik-nm-map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #555;
  padding: 0 4px;
}
.pik-nm-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pik-nm-map-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.pik-nm-map-popup { font-family: 'Fira Sans', sans-serif; min-width: 200px; }
.pik-nm-map-popup b { display: block; margin-bottom: 4px; font-size: 13px; line-height: 1.3; }
.pik-nm-map-popup a { color: #e5232a; font-size: 12px; font-weight: 600; }

/* Reklamy między sekcjami */
.pik-nm-ad {
  margin: 30px auto;
  text-align: center;
  min-height: 90px;
}

/* === Generic icon class — wszystkie SVG monoline === */
.pik-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  vertical-align: middle;
  display: inline-block;
}

/* === Star favorite (SVG outline + solid, toggle przez .active, bez tła) === */
.pik-nm-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s, color 0.15s;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.pik-nm-fav .pik-icon { width: 28px; height: 28px; }
.pik-nm-fav .pik-icon-star-solid { display: none; }
.pik-nm-fav.active .pik-icon-star-outline { display: none; }
.pik-nm-fav.active .pik-icon-star-solid { display: inline-block; }
.pik-nm-fav:hover { transform: scale(1.15); }
.pik-nm-fav.active { color: #e5232a; }
.pik-nm-fav.active:hover { color: #e09600; }

/* === Card actions (Czytaj więcej + .ics) === */
.pik-nm-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}
.pik-nm-card-actions .read-more-link {
  flex: 1;
  font-weight: 600;
  color: #e5232a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pik-nm-card-actions .read-more-link .pik-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}
.pik-nm-card-actions .read-more-link:hover { color: #e09600; }
.pik-nm-card-actions .read-more-link:hover .pik-icon { transform: translateX(3px); }
.pik-nm-ics-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  color: #e5232a;
  text-decoration: none;
  flex-shrink: 0;
  transition: transform 0.15s, color 0.15s;
}
.pik-nm-ics-link .pik-icon { width: 22px; height: 22px; }
.pik-nm-ics-link:hover { color: #e09600; transform: scale(1.15); }

/* === Favbar (Twój plan) === */
.pik-nm-favbar {
  margin-top: 18px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fff8e1, #ffeec1);
  border: 1px solid #e5232a;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pik-nm-favbar-text { flex: 1; min-width: 200px; font-size: 14px; color: #1a1a1a; }
.pik-nm-favbar-toggle, .pik-nm-favbar-clear {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s;
}
.pik-nm-favbar-toggle { background: #e5232a; color: #1a1a1a; }
.pik-nm-favbar-toggle:hover { background: #e09600; }
.pik-nm-favbar-toggle.active { background: #1a1a1a; color: #e5232a; }
.pik-nm-favbar-clear { background: transparent; color: #777; border: 1px solid #ccc; }
.pik-nm-favbar-clear:hover { background: #f0f0f0; color: #1a1a1a; }

/* === Instagram/Facebook pill (TYLKO MOBILE) === */
.pik-ig-pill-wrap { display: none; }
@media (max-width: 768px) {
  .pik-ig-pill-wrap {
    display: block;
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 9998;
  }
  .pik-ig-pill {
    background: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    border: none;
    border-radius: 28px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(131, 58, 180, 0.4);
    cursor: pointer;
    font-family: 'Fira Sans', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .pik-ig-pill .pik-icon { width: 20px; height: 20px; }
  .pik-ig-pill:active { transform: scale(0.96); }
}
.pik-ig-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  /* Safe area dla iPhone X+ (notch) */
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.pik-ig-overlay[hidden] { display: none !important; }
.pik-ig-modal {
  position: relative;
  background: black;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
@media (min-width: 600px) {
  .pik-ig-overlay { padding: 24px; }
  .pik-ig-modal {
    width: auto;
    max-width: 480px;
    max-height: 90vh;
    border-radius: 12px;
  }
}
.pik-ig-close {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Debug overlay — identyfikator URL żeby user mógł znaleźć "niedostępne" filmy */
.pik-ig-debug {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 6px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  text-decoration: none;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pik-ig-debug-platform {
  background: rgba(255,255,255,0.2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.pik-ig-debug-id { font-weight: 500; }
.pik-ig-debug-arrow { opacity: 0.8; }
.pik-ig-debug:hover { background: rgba(0,0,0,0.9); color: white; }
.pik-ig-track {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  background: black;
  min-height: 0;
}
.pik-ig-slide {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.pik-ig-slide.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Wrapper iframe — aspect 9:16 (vertical reel), centered w slide */
.pik-ig-iframe-wrap {
  position: relative;
  height: 100%;
  aspect-ratio: 9 / 16;
  max-width: 100%;
  background: black;
  flex-shrink: 0;
}
.pik-ig-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: black;
  display: block;
}

/* Notice o ograniczeniach platformy (FB wymaga login, IG redirect) */
.pik-ig-fb-notice {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85) 30%);
  color: white;
  padding: 24px 14px 14px;
  font-size: 12px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.pik-ig-fb-notice a {
  pointer-events: auto;
  display: inline-block;
  background: rgba(255,255,255,0.95);
  color: #1a1a1a;
  padding: 8px 14px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  align-self: flex-start;
}
.pik-ig-fb-notice a:hover {
  background: white;
  color: #1877f2;
}
.pik-ig-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: none;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  font-size: 24px;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.pik-ig-prev { left: 12px; }
.pik-ig-next { right: 12px; }
.pik-ig-nav:disabled { opacity: 0.3; cursor: default; }
.pik-ig-dots {
  display: flex;
  gap: 8px;
  padding: 12px;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  flex-shrink: 0;
}
.pik-ig-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.pik-ig-dot.active { background: white; transform: scale(1.2); }
/* Hide dots if only 1 slide */
.pik-ig-modal:has(.pik-ig-slide:only-child) .pik-ig-dots,
.pik-ig-modal:has(.pik-ig-slide:only-child) .pik-ig-nav { display: none; }

/* Outro */
.pik-nm-outro {
  margin-top: 30px;
  padding: 18px;
  background: #fafafa;
  border-radius: 8px;
  text-align: center;
  font-size: 14px;
  color: #555;
}
