/**
 * Plakat Twojego miejsca - okno wyboru miejsca. Paleta i ksztalty okna te same, co
 * w oknach kraju, nieba i obrysu: granatowy pasek z bursztynowa kreska, bursztynowy
 * przycisk potwierdzenia, pola z 2 px obwodka, etykiety wersalikami.
 *
 * Srodek okna to SAM PLAKAT: mapa w kolorach druku, kadr o proporcji arkusza
 * i napisy krojami z druku (Bebas Neue, Michroma). Klient widzi plakat, a nie mape.
 *
 * Motyw (BeTheme) stylizuje globalnie button/input/label - stad !important przy
 * polach i przyciskach (padding 15px 35px robil z krzyzyka elipse).
 */
.mpl { display: block; flex: 0 0 100%; width: 100%; margin: 0 0 18px; }

.mpl .mpl-otworz {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100% !important;
  min-height: 56px;
  padding: 0 20px !important;
  border: 2px solid #0B3954 !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #0B3954 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}
/* Ikona: pinezka. */
.mpl .mpl-otworz::before {
  content: "";
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B3954' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21s-6.5-5.6-6.5-11a6.5 6.5 0 0 1 13 0c0 5.4-6.5 11-6.5 11z'/%3E%3Ccircle cx='12' cy='10' r='2.4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mpl .mpl-otworz:hover { background: #0B3954 !important; color: #fff !important; transform: translateY(-2px); }
.mpl .mpl-otworz:hover::before { filter: brightness(0) invert(1); }
.mpl .mpl-otworz[hidden] { display: none !important; }
.mpl .mpl-brak-miejsca { margin: 8px 0 0 !important; color: #A35E00; font-size: 13px; font-weight: 700; line-height: 18px; }
.mpl .mpl-brak-miejsca[hidden] { display: none; }

/* Wybrane miejsce na karcie produktu: miniatura plakatu + opis. */
.mpl .mpl-wybor { display: flex; align-items: center; gap: 14px; margin: 10px 0 0; padding: 10px; border: 1px solid #E3D6BF; border-radius: 10px; background: #FBF7F0; }
.mpl .mpl-wybor[hidden] { display: none; }
.mpl .mpl-miniatura { flex: 0 0 auto; width: 64px; height: auto; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(60, 40, 10, .25); }
.mpl .mpl-wybor-opis { display: grid; gap: 2px; min-width: 0; }
.mpl .mpl-wybor-opis strong { color: #362310; font-size: 15px; line-height: 20px; }
.mpl .mpl-wybor-opis span { color: #6B5A43; font-size: 13px; line-height: 18px; }
.mpl .mpl-zmien {
  justify-self: start;
  margin: 4px 0 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #0B3954 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  text-decoration: underline;
  cursor: pointer;
}

html.mpl-otwarte { overflow: hidden; }

/* --- okno --- */
.mpl-okno { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.mpl-okno[hidden] { display: none; }
.mpl-cien { position: absolute; inset: 0; background: rgba(9, 25, 36, .72); backdrop-filter: blur(4px); animation: mpl-cien-in .22s ease-out; }
.mpl-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1120px, 100%);
  /* Wysokosc stala, nie z tresci - zmiana napisu nie moze przesuwac okna. */
  height: min(800px, calc(100dvh - 32px));
  overflow: hidden;
  border-radius: 18px;
  background: #F7F9FB;
  box-shadow: 0 30px 80px rgba(9, 25, 36, .42);
  animation: mpl-panel-in .28s cubic-bezier(.2, .7, .2, 1);
}
@keyframes mpl-cien-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mpl-panel-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .mpl-cien, .mpl-panel { animation: none; } }

.mpl-glowa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 3px solid #FFB128;
  background: linear-gradient(135deg, #0B3954 0%, #10507A 60%, #092F47 100%);
  color: #fff;
}
.mpl-glowa strong { display: block; font-size: 19px; line-height: 1.25; }
.mpl-glowa span { display: block; margin-top: 2px; color: rgba(255, 255, 255, .74); font-size: 12.5px; line-height: 1.35; }
.mpl-okno .mpl-x {
  flex: 0 0 40px;
  width: 40px !important;
  height: 40px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #fff !important;
  font-size: 28px !important;
  line-height: 40px !important;
  cursor: pointer;
}
.mpl-okno .mpl-x:hover { background: rgba(255, 255, 255, .14) !important; }

.mpl-srodek {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 20px;
  padding: 16px 20px;
  flex: 1 1 auto;
  min-height: 0;
}

/* --- mapa i kadr --- */
.mpl-lewa { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; gap: 8px; min-width: 0; min-height: 0; }
.mpl-scena { position: relative; min-width: 0; min-height: 0; border-radius: 12px; overflow: hidden; background: #8C6234; }
/* MapLibre doklada `.maplibregl-map { position: relative }` - bez swoistosci kontener
   tracil `absolute`, mial 0 px wysokosci i mapa nie rysowala nic poza tlem. */
.mpl-scena .mpl-mapa, .mpl-scena .mpl-mapa.maplibregl-map { position: absolute !important; left: 0; top: 0; width: 100%; height: 100%; transform-origin: 0 0; }
/* Wczytywanie mapy: lekka zaslona i pigulka z krecikiem. Nie przechwytuje myszy -
   mape mozna dalej przesuwac. Pojawia sie i znika plynnie, zeby nie migala. */
.mpl-wczytywanie {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(40, 26, 10, .28);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility 0s linear .2s;
}
.mpl-wczytywanie.mpl-widoczne { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.mpl-wczytywanie span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 6px 18px rgba(30, 20, 6, .3);
  color: #0B3954;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 18px;
}
.mpl-wczytywanie i {
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 2.5px solid #DDE4EB;
  border-top-color: #3F8A5A;
  border-radius: 50%;
  animation: mpl-krecik .8s linear infinite;
}
@keyframes mpl-krecik { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .mpl-wczytywanie i { animation-duration: 2.4s; } }

/* Ramka plakatu: wszystko poza nia przygaszone. Cien ma stala grubosc - kadr
   zmienia proporcje przy zmianie rozmiaru, a przygaszenie idzie razem z nim. */
.mpl-kadr {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 9999px rgba(30, 20, 6, .55), 0 0 0 1px rgba(255, 244, 220, .8);
  pointer-events: none;
  overflow: hidden;
  container-type: size;
}
/* Oslona napisu - ta sama co na druku (plakat.renderuj_oslone): plama koloru tla. */
/* Poza zakresem plakatu ramka gasnie - jak w drewnianym kadrze zatwierdzic mozna tylko
   w zielonym zakresie suwaka. */
.mpl-kadr.mpl-poza { box-shadow: 0 0 0 9999px rgba(30, 20, 6, .7), 0 0 0 2px rgba(255, 177, 40, .9); }
.mpl-kadr.mpl-poza .mpl-napisy, .mpl-kadr.mpl-poza .mpl-oslona { opacity: .35; }
.mpl-oslona {
  position: absolute;
  left: 50%;
  top: 0;
  width: 78%;
  height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 42%, rgba(140, 98, 52, .62) 0%, rgba(140, 98, 52, .45) 45%, rgba(140, 98, 52, 0) 72%);
}
.mpl-napisy { position: absolute; left: 0; right: 0; top: 0; color: #EAD5AE; text-align: center; }
/* Wymiary w jednostkach kontenera = ulamki szerokosci arkusza, jak w plakat.NAPISY. */
.mpl-t-tytul {
  margin-top: 6.5cqh;
  font-family: 'MaptoriaPlakatTytul', 'Bebas Neue', Impact, sans-serif;
  font-size: 12.43cqw;
  line-height: .7;
  white-space: nowrap;
}
.mpl-t-linia {
  margin-top: 2.25cqw;
  font-family: 'MaptoriaPlakatPodpis', 'Michroma', sans-serif;
  font-size: 2.33cqw;
  letter-spacing: .42em;
  line-height: .75;
  padding-left: .42em;
  white-space: nowrap;
  text-transform: uppercase;
}
.mpl-t-linia + .mpl-t-linia { margin-top: 2.25cqw; }
.mpl-t-linia:empty { display: none; }

.mpl-wyniki { margin: 6px 0 0 !important; padding: 4px 0 !important; list-style: none !important; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(30, 20, 6, .3); }
.mpl-wyniki[hidden] { display: none; }
.mpl-wyniki li { margin: 0 !important; padding: 9px 14px !important; color: #161922; font-size: 14px; line-height: 19px; cursor: pointer; list-style: none !important; }
.mpl-wyniki li::before { display: none !important; }
.mpl-wyniki li small { display: block; color: #8A97A3; font-size: 12px; line-height: 16px; }
.mpl-wyniki li:hover, .mpl-wyniki li.mpl-aktywny { background: #F2F6F9; }
.mpl-wyniki li.mpl-brak { color: #8A97A3; cursor: default; }

/* Przyciski +/-, polozenie. Wlasne, nie MapLibre - kontener mapy jest pomniejszony
   przez nadprobkowanie, wiec jego przyciski bylyby kilka razy za male. */
.mpl-zoom { position: absolute; right: 12px; top: 12px; z-index: 3; display: grid; width: 36px; overflow: hidden; border-radius: 8px; box-shadow: 0 4px 12px rgba(30, 20, 6, .3); }
.mpl-okno .mpl-zoom button {
  display: block !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #0B3954 !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 36px !important;
  text-align: center !important;
  cursor: pointer;
}
.mpl-okno .mpl-zoom button + button { border-top: 1px solid #E3E9EE !important; }
.mpl-okno .mpl-zoom button:hover { background-color: #F2F6F9 !important; }
.mpl-okno .mpl-zoom .mpl-gdzie { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B3954' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3Cpath d='M12 2v4M12 18v4M2 12h4M18 12h4'/%3E%3C/svg%3E") center/20px no-repeat !important; }
.mpl-okno .mpl-zoom .mpl-gdzie:hover { background-color: #F2F6F9 !important; }
.mpl-osm { position: absolute; right: 8px; bottom: 6px; z-index: 2; padding: 1px 5px; border-radius: 3px; background: rgba(255, 255, 255, .78); color: #5E6B77; font-size: 10.5px; line-height: 14px; }
.mpl-osm a { color: inherit !important; }

/* --- suwak zblizenia (jak w drewnianym kadrze): zielony = dostepne zblizenie --- */
.mpl-zblizenie { display: grid; gap: 2px; }
/* Galka chodzi po pasku od jego poczatku do konca (poziomy padding = promien galki),
   wiec zielony zakres konczy sie dokladnie tam, gdzie galka przy najwiekszym zblizeniu. */
.mpl-suwak { position: relative; height: 26px; padding: 0 10px; outline: none; cursor: pointer; touch-action: none; user-select: none; }
.mpl-suwak-tor { position: relative; top: 11px; height: 5px; border-radius: 99px; background: #DDE4EB; }
.mpl-suwak-zakres { position: absolute; top: 0; right: 0; bottom: 0; border-radius: 99px; background: #3F8A5A; }
.mpl-suwak-galka {
  position: absolute;
  top: 50%;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #FFB128;
  box-shadow: 0 0 0 1px #0B3954, 0 2px 5px rgba(0, 0, 0, .2);
  transform: translate(-50%, -50%);
  transition: transform .12s ease;
}
.mpl-suwak:focus-visible .mpl-suwak-galka { box-shadow: 0 0 0 1px #0B3954, 0 0 0 5px rgba(63, 138, 90, .35); }
.mpl-suwak.mpl-ciagniety .mpl-suwak-galka { transform: translate(-50%, -50%) scale(1.1); }
.mpl-suwak-opisy { display: flex; justify-content: space-between; gap: 12px; padding: 0 2px; color: #5E6B77; font-size: 11px; line-height: 14px; }
.mpl-podpowiedz { color: #A35E00; font-weight: 700; }
.mpl-nazwy-info { margin: 0 !important; color: #5E6B77; font-size: 12px; line-height: 16px; }

/* --- wyszukiwarka w panelu --- */
.mpl-szukaj { position: relative; }
.mpl-szukaj-pole { position: relative; }
.mpl-okno .mpl-szukaj input {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 46px 0 13px !important;
  border: 2px solid #DDE4EB !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #161922 !important;
  font-family: inherit;
  font-size: 15px !important;
  line-height: 36px !important;
}
.mpl-okno .mpl-szukaj input:focus { border-color: #0B3954 !important; outline: none; }
.mpl-okno .mpl-szukaj button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 32px !important;
  height: 32px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: #0B3954 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5 5'/%3E%3C/svg%3E") center/18px no-repeat !important;
  box-shadow: none !important;
  font-size: 0 !important;
  cursor: pointer;
}
.mpl-szukaj .mpl-wyniki { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; }

/* --- pola --- */
.mpl-pola { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; }
.mpl-grupa { display: grid; gap: 6px; margin: 0; }
.mpl-oddziel { padding-top: 12px; border-top: 1px solid #E3E9EE; }
.mpl-etykieta { display: block; margin: 0; color: #0B3954; font-size: 11px; font-weight: 700; letter-spacing: .05em; line-height: 15px; text-transform: uppercase; }
.mpl-rozmiary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mpl-okno .mpl-rozmiar {
  display: grid !important;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-height: 70px !important;
  margin: 0 !important;
  padding: 6px 2px !important;
  border: 2px solid #DDE4EB !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #161922 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
  cursor: pointer;
}
/* Prostokacik w proporcji arkusza - roznica 30x40 i A1 widoczna od razu. */
.mpl-okno .mpl-rozmiar i { display: block; width: 22px; border: 2px solid currentColor; border-radius: 2px; background: #E9D9B4; }
.mpl-okno .mpl-rozmiar:hover { border-color: #8A97A3 !important; }
.mpl-okno .mpl-rozmiar.mpl-wybrany { border-color: #0B3954 !important; background: #0B3954 !important; color: #fff !important; }
.mpl-okno .mpl-rozmiar.mpl-wybrany i { background: #8C6234; }
.mpl-okno .mpl-pole { display: grid !important; gap: 4px; margin: 0 !important; font-weight: 400 !important; }
.mpl-okno .mpl-pole > span { color: #5E6B77; font-size: 12.5px; line-height: 16px; }
.mpl-okno .mpl-pole > span i { color: #8A97A3; font-style: normal; }
.mpl-okno .mpl-pole input {
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px;
  margin: 0 !important;
  padding: 0 13px !important;
  border: 2px solid #DDE4EB !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
  color: #161922 !important;
  font-family: inherit;
  font-size: 15px !important;
  line-height: 36px !important;
}
.mpl-okno .mpl-pole input:focus { border-color: #0B3954 !important; outline: none; background: #fff !important; }
.mpl-okno .mpl-auto {
  justify-self: start;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #0B3954 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  line-height: 16px !important;
  text-decoration: underline;
  cursor: pointer;
}
.mpl-okno .mpl-auto[hidden] { display: none !important; }

.mpl-stopka { display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 14px 20px; border-top: 1px solid #E3E9EE; background: #fff; }
.mpl-stopka-info { margin-right: auto; color: #5E6B77; font-size: 13px; line-height: 18px; }
.mpl-okno .mpl-zatwierdz {
  white-space: nowrap;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 28px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #FFB128 !important;
  box-shadow: 0 6px 16px rgba(255, 177, 40, .35) !important;
  color: #0B3954 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 48px !important;
  cursor: pointer;
}
.mpl-okno .mpl-zatwierdz:hover { background: #FFC14F !important; }
.mpl-okno .mpl-zatwierdz:disabled { background: #E3E9EE !important; box-shadow: none !important; color: #8A97A3 !important; cursor: not-allowed; }

/* --- telefon: mapa na gorze, pola pod nia, przewijane razem --- */
@media (max-width: 760px) {
  .mpl-okno { padding: 0; }
  .mpl-panel { width: 100%; height: 100dvh; border-radius: 0; }
  .mpl-glowa { padding: 12px 14px; }
  .mpl-glowa span { display: none; }
  .mpl-srodek { display: flex; flex-direction: column; gap: 14px; padding: 12px 14px; overflow-y: auto; }
  .mpl-lewa { flex: 0 0 auto; }
  .mpl-scena { height: 58dvh; }
  .mpl-pola { overflow: visible; }
  .mpl-stopka { padding: 10px 14px; }
  .mpl-stopka-info { font-size: 11.5px; line-height: 15px; }
  .mpl-okno .mpl-zatwierdz { padding: 0 18px !important; }
}

/* Opis wybranego rozmiaru pod rozmiarami (zamiast opisu wariantu, ktory spychal przycisk).
   Wszystkie teksty w jednej komorce siatki: wysokosc = najdluzszy, zmiana tekstu nic nie przesuwa. */
.mpl-opisy { display: grid; margin: 8px 0 14px; }
.mpl-opisy > p { grid-area: 1 / 1; margin: 0 !important; padding: 0 !important; color: #6B5A43; font-size: 13px !important; line-height: 19px !important; visibility: hidden; }
.mpl-opisy > p.mpl-aktywny { visibility: visible; }
/* Plakat toru (09.10.2026): kadr stoi na torze, w oknie zostaja same napisy. Bez szukania,
   przyblizania, suwaka, wyboru rozmiaru (jest w formularzu), lokalizacji i podpowiedzi o nazwach. */
.mpl-okno.mpl-tor .mpl-zoom,
.mpl-okno.mpl-tor .mpl-zblizenie,
.mpl-okno.mpl-tor .mpl-szukaj,
.mpl-okno.mpl-tor .mpl-grupa:has(.mpl-rozmiary),
.mpl-okno.mpl-tor .mpl-nazwy-info,
.mpl-okno.mpl-tor .mpl-auto { display: none !important; }
.mpl-okno.mpl-tor .mpl-grupa.mpl-oddziel { border-top: 0; padding-top: 0; margin-top: 0; }
.mpl-okno.mpl-tor .mpl-mapa, .mpl-okno.mpl-tor .mpl-kadr { cursor: default; }
