/* Galeria warstw map MapoTero - dopasowana do jasnego motywu Just the Docs */

#galeria-warstw-app,
#galeria-warstw-app * {
  box-sizing: border-box;
}

html.gw-bez-scrolla,
body.gw-bez-scrolla {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* Neutralizacja globalnych stylów obrazów i linków z motywu Just the Docs (head_custom.html) */
#galeria-warstw-app img {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background-color: transparent !important;
  transition: none !important;
}

#galeria-warstw-app img[hidden] {
  display: none !important;
}

#galeria-warstw-app a.gw-btn-prosty {
  color: #27262b !important;
  border-bottom: 1px solid #d5d0d8 !important;
  text-decoration: none !important;
}

#galeria-warstw-app a.gw-btn-prosty:hover {
  color: #7253ed !important;
  border-color: #7253ed !important;
}

#galeria-warstw-app button,
#galeria-warstw-app input,
#galeria-warstw-app select {
  font-family: inherit;
}

.gw-panel-filtrow {
  position: sticky;
  top: 0.5rem;
  z-index: 20;
  background: rgba(245, 246, 250, 0.96);
  backdrop-filter: blur(6px);
  border: 1px solid #e6e1e8;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  margin: 1.25rem 0 0.85rem;
  box-shadow: 0 4px 12px rgba(39, 38, 43, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gw-btn-filtry-mobile {
  display: none;
  border: 1px solid #d5d0d8;
  background: #ffffff;
  color: #27262b;
  border-radius: 4px;
  padding: 0 0.8rem;
  min-height: 44px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.gw-btn-filtry-mobile.ma-aktywne {
  border-color: #7253ed;
  color: #5b3fd4;
  background: #f5f3ff;
}

.gw-btn-filtry-mobile.otwarte {
  background: #7253ed;
  border-color: #7253ed;
  color: #ffffff;
}

.gw-filtry-rozwijane {
  display: block;
}

.gw-pasek-grup {
  display: none;
}

@media (max-height: 480px) {
  .gw-panel-filtrow {
    position: static;
    box-shadow: none;
  }
}

.gw-wiersz-gorny {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.gw-szukaj {
  flex: 1 1 240px;
  padding: 0.5rem 0.75rem;
  font-size: 0.92rem;
  border: 1px solid #d5d0d8;
  border-radius: 4px;
  background: #ffffff;
  color: #27262b;
}

.gw-szukaj:focus,
.gw-select-grupa:focus {
  outline: 2px solid #7253ed;
  outline-offset: 1px;
  border-color: #7253ed;
}

.gw-select-grupa {
  flex: 1 1 220px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid #d5d0d8;
  border-radius: 4px;
  background: #ffffff;
  color: #27262b;
}

.gw-wiersz-dolny {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  align-items: center;
  justify-content: space-between;
}

.gw-grupy-pigulek {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  align-items: center;
}

.gw-pigulki {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.gw-etykieta-filtru {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5c5962;
  margin-right: 0.15rem;
}

.gw-btn-filtr {
  border: 1px solid #d5d0d8;
  background: #ffffff;
  color: #27262b;
  border-radius: 999px;
  padding: 0.24rem 0.68rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gw-btn-filtr:hover {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-btn-filtr.aktywny {
  background: #7253ed;
  border-color: #7253ed;
  color: #ffffff;
  font-weight: 600;
}

.gw-prawa-narzedzia {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-left: auto;
}

.gw-btn-reset {
  border: 1px solid #d5d0d8;
  background: #ffffff;
  color: #5c5962;
  border-radius: 4px;
  padding: 0.22rem 0.55rem;
  font-size: 0.78rem;
  cursor: pointer;
}

.gw-btn-reset:hover {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-licznik {
  font-size: 0.83rem;
  color: #5c5962;
  margin: 0;
}

.gw-sekcja-grupy {
  margin-top: 2rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 320px;
}

.gw-naglowek-grupy {
  border-bottom: 1px solid #e6e1e8;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.gw-naglowek-grupy h2 {
  margin: 0;
  font-size: 1.25rem;
}

.gw-liczba-w-grupie {
  font-size: 0.85rem;
  color: #5c5962;
  font-weight: 400;
}

.gw-podgrupa-tytul {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.96rem;
  font-weight: 600;
  color: #5c5962;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.gw-podgrupa-tytul::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 0.95em;
  border-radius: 2px;
  background: #7253ed;
}

.gw-siatka {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 1rem;
}

.gw-siatka.gw-siatka-duza {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.2rem;
}

.gw-karta {
  border: 1px solid #e6e1e8;
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: left;
  padding: 0;
  box-shadow: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .gw-karta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(39, 38, 43, 0.1);
    border-color: #7253ed;
  }
}

.gw-karta:focus-visible {
  box-shadow: 0 4px 14px rgba(39, 38, 43, 0.1);
  border-color: #7253ed;
  outline: none;
}

.gw-miniatura-ramka {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #f0eff4;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gw-miniatura-ramka.gw-nakladka-tlo {
  background-image:
    linear-gradient(45deg, #e7e5ec 25%, transparent 25%),
    linear-gradient(-45deg, #e7e5ec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7e5ec 75%),
    linear-gradient(-45deg, transparent 75%, #e7e5ec 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.gw-miniatura-ramka img {
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  display: block;
}

.gw-placeholder {
  padding: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: #6b6772;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.gw-placeholder[hidden] {
  display: none;
}

.gw-placeholder-ikona {
  width: 34px;
  height: 34px;
  opacity: 0.45;
}

.gw-odznaki {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.gw-odznaka {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.16rem 0.46rem;
  border-radius: 3px;
  background: rgba(39, 38, 43, 0.85);
  color: #ffffff;
  letter-spacing: 0.02em;
}

.gw-odznaka-wmts {
  background: rgba(29, 78, 216, 0.88);
}

.gw-odznaka-wms {
  background: rgba(15, 118, 110, 0.88);
}

.gw-odznaka-xyz {
  background: rgba(180, 83, 9, 0.88);
}

.gw-odznaka-nakladka {
  background: rgba(114, 83, 237, 0.92);
}

.gw-tresc-karty {
  padding: 0.65rem 0.75rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.gw-nazwa-warstwy {
  font-size: 0.92rem;
  font-weight: 600;
  color: #27262b;
  line-height: 1.3;
}

.gw-meta-karty {
  font-size: 0.78rem;
  color: #5c5962;
  line-height: 1.35;
  word-break: break-word;
}

.gw-brak-wynikow {
  background: #f5f6fa;
  border: 1px dashed #d5d0d8;
  border-radius: 6px;
  padding: 1.5rem;
  text-align: center;
  color: #5c5962;
  margin-top: 1rem;
}

/* Modal powiększenia */
.gw-modal-tlo {
  position: fixed;
  inset: 0;
  background: rgba(24, 23, 29, 0.72);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gw-modal-tlo[hidden] {
  display: none;
}

.gw-modal {
  background: #ffffff;
  color: #27262b;
  border-radius: 8px;
  max-width: 860px;
  width: 100%;
  max-height: 92dvh;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
}

.gw-modal-mobile-top,
.gw-modal-mobile-stopka {
  display: none;
}

.gw-modal-cialo {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) 1fr;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.gw-modal-obraz-kol {
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  position: relative;
  border-right: 1px solid #e6e1e8;
  overflow-y: auto;
  min-height: 380px;
}

.gw-modal-tabs {
  display: flex;
  background: #ede9f2;
  border-bottom: 1px solid #d5d0d8;
  padding: 0.4rem 0.5rem 0;
  gap: 0.35rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.gw-modal-tab {
  border: 1px solid transparent;
  border-bottom: none;
  background: transparent;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5c5962;
  border-radius: 5px 5px 0 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.gw-modal-tab:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #27262b;
}

.gw-modal-tab.aktywny {
  background: #ffffff;
  color: #1d4ed8;
  border-color: #d5d0d8;
  border-bottom-color: #ffffff;
  margin-bottom: -1px;
}

.gw-modal-panel-probka {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem;
  min-height: 320px;
  position: relative;
  background: #f8fafc;
}

.gw-modal-panel-probka[hidden],
.gw-modal-panel-zasieg[hidden] {
  display: none !important;
}

.gw-modal-panel-probka.gw-nakladka-tlo {
  background-image:
    linear-gradient(45deg, #e7e5ec 25%, transparent 25%),
    linear-gradient(-45deg, #e7e5ec 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e7e5ec 75%),
    linear-gradient(-45deg, transparent 75%, #e7e5ec 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.gw-modal-panel-probka img {
  width: 100%;
  max-width: 420px;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  display: block;
  cursor: zoom-in;
}

.gw-btn-powieksz-probke {
  margin-top: 0.55rem;
  border: 1px solid #d5d0d8;
  background: rgba(255, 255, 255, 0.92);
  color: #27262b;
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.gw-btn-powieksz-probke:hover {
  border-color: #7253ed;
  color: #7253ed;
}

/* Pełnoekranowe powiększenie próbki w modalu */
.gw-probka-zoom-tlo {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(15, 23, 42, 0.94);
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px);
}

.gw-probka-zoom-tlo[hidden] {
  display: none !important;
}

.gw-probka-zoom-pasek {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.9rem;
  color: #f8fafc;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  flex-shrink: 0;
}

.gw-probka-zoom-tytul {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.gw-probka-zoom-zamknij {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.gw-probka-zoom-obszar {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  touch-action: pinch-zoom pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.gw-probka-zoom-obszar img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45) !important;
}

.gw-probka-zoom-podpowiedz {
  text-align: center;
  color: #94a3b8;
  font-size: 0.76rem;
  padding: 0.4rem 0.75rem 0.65rem;
  flex-shrink: 0;
}

.gw-modal-panel-zasieg {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  padding: 0.85rem;
  min-height: 320px;
}

.gw-widok-zasiegu-kontener {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  gap: 0.65rem;
  align-items: center;
}

.gw-zasieg-svg {
  width: 100%;
  max-width: 380px;
  max-height: 320px;
  height: auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  display: block;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Warstwy wektorowe mapy */
.gw-mapa-akwen {
  fill: #e0f2fe;
  stroke: #bae6fd;
  stroke-width: 0.75;
}

.gw-mapa-sasiad {
  fill: #f1f5f9;
  stroke: #cbd5e1;
  stroke-width: 0.75;
}

.gw-mapa-polska {
  fill: #f8fafc;
  stroke: #94a3b8;
  stroke-width: 1.1;
  transition: all 0.25s ease;
}

.gw-mapa-rzeka {
  stroke: #93c5fd;
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}

/* Wyróżnienia zasięgu */
.gw-mapa-polska.gw-mapa-aktywny {
  fill: #dbeafe;
  stroke: #2563eb;
  stroke-width: 1.8;
}

.gw-mapa-polska.gw-mapa-baza-regionalna {
  fill: #f1f5f9;
  stroke: #64748b;
  stroke-width: 1.2;
}

.gw-mapa-akwen.gw-mapa-aktywny-morze {
  fill: #0284c7;
  fill-opacity: 0.45;
  stroke: #0369a1;
  stroke-width: 1.8;
}

.gw-mapa-sasiad.gw-mapa-aktywny-zagranica {
  fill: #a7f3d0;
  stroke: #059669;
  stroke-width: 1.8;
}

/* Bounding box dla warstw regionalnych */
.gw-mapa-bbox {
  fill: rgba(220, 38, 38, 0.22);
  stroke: #dc2626;
  stroke-width: 1.8;
  stroke-dasharray: 4 2;
  animation: gw-bbox-puls 2s infinite ease-in-out;
}

@keyframes gw-bbox-puls {
  0%, 100% { fill-opacity: 0.22; stroke-width: 1.8; }
  50% { fill-opacity: 0.38; stroke-width: 2.2; }
}

/* Komórki siatki rzeczywistego zasięgu */
.gw-mapa-komorka {
  fill: #2563eb;
  fill-opacity: 0.58;
  stroke: #1d4ed8;
  stroke-width: 0.25;
  transition: fill-opacity 0.2s ease;
}

.gw-mapa-komorka:hover {
  fill: #1d4ed8;
  fill-opacity: 0.85;
}

.gw-zasieg-procent-odznaka {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.gw-zasieg-procent-pelne {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.gw-zasieg-procent-czesciowe {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.gw-zasieg-procent-regionalne {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

/* Punkty miast TrueOrtho */
.gw-mapa-punkt-trueortho .gw-punkt-pierscien {
  fill: none;
  stroke: #dc2626;
  stroke-width: 1.2;
  opacity: 0.6;
}

.gw-mapa-punkt-trueortho .gw-punkt-kropka {
  fill: #dc2626;
}

.gw-mapa-punkt-trueortho .gw-punkt-etykieta {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 7.5px;
  font-weight: 700;
  fill: #991b1b;
}

/* Nakładka globalna */
.gw-mapa-nakladka-globalna {
  fill: rgba(14, 165, 233, 0.08);
}

.gw-mapa-globus .gw-globus-tlo {
  fill: #f0f9ff;
  stroke: #0284c7;
  stroke-width: 1.5;
}

.gw-mapa-globus .gw-globus-siatka {
  stroke: #38bdf8;
  stroke-width: 1;
}

.gw-mapa-globus .gw-globus-napis {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 8.5px;
  font-weight: 800;
  fill: #0369a1;
  letter-spacing: 0.08em;
}

/* Etykiety i napisy na mapie */
.gw-etykieta-kraju {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 8px;
  font-weight: 700;
  fill: #94a3b8;
  letter-spacing: 0.05em;
  user-select: none;
  pointer-events: none;
}

.gw-etykieta-polska {
  font-size: 11px;
  font-weight: 800;
  fill: #64748b;
  letter-spacing: 0.1em;
}

.gw-etykieta-baltyk {
  fill: #7dd3fc;
}

/* Punkty miast */
.gw-miasto-kropka {
  fill: #475569;
}

.gw-miasto-nazwa {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 7.5px;
  font-weight: 500;
  fill: #475569;
  user-select: none;
  pointer-events: none;
}

/* Karta informacyjna pod mapą */
.gw-zasieg-info-karta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: left;
}

.gw-zasieg-info-tytul {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: #1e293b;
}

.gw-zasieg-info-ikona {
  font-size: 1rem;
  line-height: 1;
}

.gw-zasieg-info-opis {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.35;
}

/* Przycisk linkujący do zasięgu w tabeli modala */
.gw-link-pokaz-zasieg {
  background: none;
  border: none;
  padding: 0 0.2rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  display: inline-block;
  vertical-align: middle;
}

.gw-link-pokaz-zasieg:hover {
  color: #1d4ed8;
}

/* Odznaki zasięgu na miniaturach kart w siatce */
.gw-odznaka-zasieg {
  font-size: 0.68rem;
}

.gw-zasieg-region {
  background: rgba(217, 119, 6, 0.92);
}

.gw-zasieg-czesciowy {
  background: rgba(202, 138, 4, 0.92);
}

.gw-zasieg-kraj {
  background: rgba(5, 150, 105, 0.92);
}

.gw-zasieg-morze {
  background: rgba(2, 132, 199, 0.92);
}

.gw-zasieg-swiat {
  background: rgba(109, 40, 217, 0.92);
}

.gw-zasieg-procent-wiersz {
  margin: 0.15rem 0;
}

.gw-modal-info-kol {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.gw-modal-naglowek {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.gw-modal-tytul {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.gw-modal-zamknij {
  border: 1px solid #d5d0d8;
  background: #ffffff;
  color: #27262b;
  border-radius: 4px;
  width: 2rem;
  height: 2rem;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.gw-modal-zamknij:hover {
  background: #f5f6fa;
}

.gw-modal-sciezka {
  font-size: 0.8rem;
  color: #5c5962;
  background: #f5f6fa;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  line-height: 1.35;
}

.gw-modal-tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.gw-modal-tabela th,
.gw-modal-tabela td {
  padding: 0.35rem 0.25rem;
  border-bottom: 1px solid #eeebee;
  text-align: left;
  vertical-align: top;
}

.gw-modal-tabela th {
  color: #5c5962;
  font-weight: 600;
  width: 38%;
}

.gw-modal-akcje {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
}

.gw-modal-linki,
.gw-modal-nawigacja {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.gw-btn-prosty {
  border: 1px solid #d5d0d8;
  background: #f5f6fa;
  color: #27262b;
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: none;
}

.gw-btn-prosty:hover:not(:disabled) {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-btn-prosty:disabled {
  opacity: 0.45;
  cursor: default;
}

.gw-stopka-danych {
  margin-top: 2rem;
  font-size: 0.82rem;
  color: #5c5962;
}

/* Integracja z działającym programem MapoTero */
.gw-pasek-mapotero {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  font-size: 0.85rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.gw-pasek-mapotero.gw-pasek-blad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.gw-btn-dodaj {
  margin-top: 0.45rem;
  width: 100%;
  border: 1px solid #7253ed;
  background: #7253ed;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.34rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gw-btn-dodaj:hover:not(:disabled) {
  background: #5b3fd4;
  border-color: #5b3fd4;
}

.gw-btn-dodaj.gw-dodano {
  background: #0f766e;
  border-color: #0f766e;
}

.gw-btn-dodaj:disabled {
  opacity: 0.7;
  cursor: default;
}

.gw-btn-dodaj-modal {
  border: 1px solid #7253ed;
  background: #7253ed;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.gw-btn-dodaj-modal:hover:not(:disabled) {
  background: #5b3fd4;
  border-color: #5b3fd4;
}

.gw-btn-dodaj-modal.gw-dodano {
  background: #0f766e;
  border-color: #0f766e;
}

/* Haczyki kanapki na kartach galerii */
.gw-karta.gw-karta-w-kanapce {
  border-color: #7253ed;
  box-shadow: 0 0 0 2px rgba(114, 83, 237, 0.22);
}

.gw-akcje-karty {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  gap: 0.4rem;
  align-items: stretch;
}

.gw-akcje-karty .gw-btn-dodaj {
  margin-top: 0;
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.65rem;
  border-color: #c4b5fd;
  background: #ffffff;
  color: #5b3fd4;
}

.gw-akcje-karty .gw-btn-dodaj[hidden],
.gw-btn-dodaj-modal[hidden] {
  display: none !important;
}

.gw-akcje-karty .gw-btn-dodaj:hover:not(:disabled) {
  background: #7253ed;
  border-color: #7253ed;
  color: #ffffff;
}

.gw-akcje-karty .gw-btn-dodaj.gw-dodano {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.gw-btn-kanapka {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 2rem;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid #d5d0d8;
  background: #f5f6fa;
  color: #27262b;
  border-radius: 4px;
  padding: 0.34rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gw-btn-kanapka:hover {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-btn-kanapka.aktywny {
  background: #ede9fe;
  border-color: #7253ed;
  color: #4c1d95;
}

/* Dolny dok Miksera kanapki */
.gw-mikser-dok {
  position: sticky;
  bottom: 0.65rem;
  z-index: 30;
  margin-top: 1.5rem;
  background: #ffffff;
  border: 1px solid #7253ed;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(39, 38, 43, 0.16);
  padding: 0.65rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.gw-mikser-dok-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.85rem;
  font-size: 0.86rem;
  color: #27262b;
}

.gw-mikser-badge {
  background: #7253ed;
  color: #ffffff;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-weight: 700;
  font-size: 0.8rem;
}

.gw-mikser-dok.zwiniety {
  width: fit-content;
  margin-left: auto;
  padding: 0.45rem 0.75rem;
}

.gw-mikser-dok.zwiniety .gw-mikser-dok-opis,
.gw-mikser-dok.zwiniety .gw-mikser-dok-akcje-pelne {
  display: none;
}

.gw-mikser-dok-akcje {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.gw-mikser-dok-akcje-pelne {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.gw-btn-zamknij-tekst {
  width: auto;
  padding: 0 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.gw-btn-glowny {
  border: 1px solid #7253ed;
  background: #7253ed;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.38rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.gw-btn-glowny:hover:not(:disabled) {
  background: #5b3fd4;
  border-color: #5b3fd4;
}

.gw-btn-glowny:disabled {
  opacity: 0.55;
  cursor: default;
}

.gw-btn-zielony {
  border: 1px solid #0f766e;
  background: #0f766e;
  color: #ffffff;
  border-radius: 4px;
  padding: 0.38rem 0.78rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.gw-btn-zielony:hover:not(:disabled) {
  background: #0d5c56;
  border-color: #0d5c56;
}

/* Okno Miksera kanapki */
.gw-mikser-modal-tlo {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(24, 24, 32, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.gw-mikser-modal-tlo[hidden] {
  display: none;
}

.gw-mikser-modal {
  background: #ffffff;
  border-radius: 8px;
  width: 100%;
  max-width: 1080px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.gw-mikser-naglowek {
  padding: 0.75rem 1.15rem;
  border-bottom: 1px solid #e6e1e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f5f6fa;
}

.gw-mikser-naglowek-tekst {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.gw-mikser-naglowek h3 {
  margin: 0;
  font-size: 1.05rem;
}

.gw-mikser-podtytul {
  font-size: 0.78rem;
  color: #5c5962;
}

.gw-mikser-wskazowka-polaczenie {
  margin: 0.65rem 1.15rem 0;
  padding: 0.52rem 0.78rem;
  border-radius: 6px;
  border: 1px solid #c4b5fd;
  background: #f5f3ff;
  color: #3b2667;
  font-size: 0.81rem;
  line-height: 1.4;
}

.gw-mikser-cialo {
  padding: 1rem 1.15rem;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 1.15rem;
  align-items: start;
}

@media (max-width: 860px) {
  .gw-mikser-cialo {
    grid-template-columns: 1fr;
  }
}

.gw-mikser-kol-podglad {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gw-mikser-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: #f1f0f5;
  padding: 0.25rem;
  border-radius: 6px;
}

.gw-mikser-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #5c5962;
  border-radius: 4px;
  padding: 0.36rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gw-mikser-tab:hover {
  color: #27262b;
}

.gw-mikser-tab.aktywny {
  background: #ffffff;
  color: #4c1d95;
  border-color: #ddd6fe;
  box-shadow: 0 1px 3px rgba(39, 38, 43, 0.08);
}

.gw-mikser-panel {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gw-mikser-panel[hidden] {
  display: none !important;
}

.gw-mikser-ramka-podgladu {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border: 1px solid #d5d0d8;
  border-radius: 6px;
  overflow: hidden;
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #f2f2f2 25%, transparent 25%),
    linear-gradient(-45deg, #f2f2f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f2f2f2 75%),
    linear-gradient(-45deg, transparent 75%, #f2f2f2 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.gw-mikser-ramka-podgladu canvas,
.gw-mikser-ramka-podgladu img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  display: block;
  object-fit: contain;
}

.gw-mikser-ramka-podgladu canvas[hidden],
.gw-mikser-ramka-podgladu img[hidden] {
  display: none !important;
}

.gw-mikser-ladowanie {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.84rem;
  font-weight: 600;
  color: #27262b;
}

.gw-mikser-ladowanie[hidden] {
  display: none;
}

.gw-mikser-sterowanie-podgladu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
}

.gw-mikser-skala-grupa {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.gw-mikser-btn-zoom {
  border: 1px solid #d5d0d8;
  background: #f5f6fa;
  color: #27262b;
  border-radius: 4px;
  min-width: 1.75rem;
  height: 1.78rem;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.35rem;
}

.gw-mikser-btn-zoom:hover:not(:disabled) {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-mikser-btn-zoom:disabled {
  opacity: 0.4;
  cursor: default;
}

.gw-mikser-sterowanie-podgladu select {
  padding: 0.25rem 0.45rem;
  border: 1px solid #d5d0d8;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #ffffff;
}

.gw-mikser-stan-podgladu {
  font-size: 0.78rem;
  color: #5c5962;
  background: #f5f6fa;
  border: 1px solid #e6e1e8;
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  line-height: 1.35;
}

.gw-mikser-stan-podgladu.ostrzezenie {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.gw-mikser-minimapa-box {
  border: 1px solid #d5d0d8;
  border-radius: 6px;
  padding: 0.55rem;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.gw-mikser-minimapa-box[hidden] {
  display: none !important;
}

.gw-minimapa-narzedzia {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.gw-minimapa-grupa-btn {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}

.gw-minimapa-narzedzia button {
  border: 1px solid #d5d0d8;
  background: #ffffff;
  color: #27262b;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.gw-minimapa-narzedzia button:hover:not(:disabled) {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-minimapa-narzedzia button.aktywny {
  background: #7253ed;
  border-color: #7253ed;
  color: #ffffff;
}

.gw-minimapa-zoom-tekst {
  font-size: 0.74rem;
  color: #5c5962;
  padding: 0 0.2rem;
}

.gw-minimapa-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 360 / 290;
  overflow: hidden;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  background: #e2e8f0;
}

.gw-minimapa-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

.gw-minimapa-canvas.tryb-przesun {
  cursor: grab;
}

.gw-minimapa-canvas.tryb-przesun.przeciaga {
  cursor: grabbing;
}

.gw-minimapa-canvas.tryb-zaznacz {
  cursor: crosshair;
}

.gw-minimapa-info {
  font-size: 0.74rem;
  color: #5c5962;
  line-height: 1.3;
}

.gw-minimapa-skroty {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.gw-minimapa-skroty button {
  border: 1px solid #d5d0d8;
  background: #ffffff;
  border-radius: 4px;
  padding: 0.18rem 0.45rem;
  font-size: 0.74rem;
  cursor: pointer;
}

.gw-minimapa-skroty button:hover {
  border-color: #7253ed;
  color: #7253ed;
}

/* Prawa kolumna miksera: lista warstw i akcje */
.gw-mikser-kol-lista {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.gw-mikser-pasek-listy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #5c5962;
}

.gw-mikser-warstwy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 44vh;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.gw-mikser-wiersz {
  border: 1px solid #e6e1e8;
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gw-mikser-wiersz-gora {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  justify-content: space-between;
}

.gw-mikser-poz-nazwa {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1 1 auto;
}

.gw-mikser-numer {
  flex-shrink: 0;
  min-width: 1.5rem;
  height: 1.4rem;
  border-radius: 4px;
  background: #f5f6fa;
  border: 1px solid #d5d0d8;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #27262b;
}

.gw-mikser-tytul-warstwy {
  font-size: 0.86rem;
  font-weight: 600;
  color: #27262b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gw-mikser-zbior-etykieta {
  font-size: 0.74rem;
  color: #5c5962;
  flex-shrink: 0;
}

.gw-mikser-przyciski-kolejnosci {
  display: inline-flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.gw-mikser-przyciski-kolejnosci button {
  border: 1px solid #d5d0d8;
  background: #f5f6fa;
  color: #27262b;
  border-radius: 4px;
  width: 1.7rem;
  height: 1.6rem;
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0;
}

.gw-mikser-przyciski-kolejnosci button:hover:not(:disabled) {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-mikser-przyciski-kolejnosci button:disabled {
  opacity: 0.35;
  cursor: default;
}

.gw-mikser-wiersz-dol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
}

.gw-mikser-suwak-grupa {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 180px;
}

.gw-mikser-suwak-grupa input[type="range"] {
  flex: 1 1 auto;
  accent-color: #7253ed;
}

.gw-mikser-krycie-wartosc {
  min-width: 2.6rem;
  text-align: right;
  font-weight: 600;
  color: #27262b;
}

.gw-mikser-tryb-select {
  padding: 0.24rem 0.45rem;
  border: 1px solid #d5d0d8;
  border-radius: 4px;
  font-size: 0.8rem;
  background: #ffffff;
}

.gw-mikser-skala-etykieta {
  font-size: 0.74rem;
  color: #5c5962;
  background: #f5f6fa;
  border: 1px solid #e6e1e8;
  border-radius: 4px;
  padding: 0.14rem 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.gw-mikser-ostrzezenia {
  font-size: 0.8rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 5px;
  padding: 0.45rem 0.65rem;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gw-mikser-ostrzezenie-wiersz {
  margin: 0;
}

.gw-mikser-ostrzezenia[hidden] {
  display: none;
}

.gw-mikser-eksport {
  border-top: 1px solid #e6e1e8;
  padding-top: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gw-mikser-nazwa-wiersz {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.82rem;
}

.gw-mikser-nazwa-input {
  flex: 1 1 200px;
  padding: 0.35rem 0.55rem;
  border: 1px solid #d5d0d8;
  border-radius: 4px;
  font-size: 0.84rem;
}

.gw-mikser-opcje-wiersz {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  align-items: center;
}

.gw-mikser-opcja-chk {
  font-size: 0.8rem;
  color: #4b4852;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
}

.gw-mikser-opcja-chk[hidden] {
  display: none !important;
}

.gw-mikser-baza-etykieta {
  font-size: 0.76rem;
  color: #6b6772;
  background: #f5f6fa;
  border: 1px solid #e6e1e8;
  border-radius: 4px;
  padding: 0.2rem 0.5rem;
}

.gw-mikser-wiecej {
  border-top: 1px dashed #e6e1e8;
  padding-top: 0.45rem;
}

.gw-mikser-wiecej summary {
  font-size: 0.8rem;
  color: #5c5962;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
  margin-bottom: 0.45rem;
}

.gw-mikser-wiecej summary:hover {
  color: #4c1d95;
}

.gw-mikser-akcje-glowne,
.gw-mikser-akcje-zapasowe {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.gw-mikser-podpowiedz-offline {
  font-size: 0.78rem;
  color: #5c5962;
  margin: 0;
}

.gw-mikser-status-wysylki {
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.gw-mikser-status-wysylki.blad {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.gw-mikser-btn-zwin-podglad {
  display: none;
}

.gw-mikser-btn-usun {
  margin-left: 0.35rem;
}

.gw-mikser-btn-krok {
  border: 1px solid #d5d0d8;
  background: #f5f6fa;
  color: #27262b;
  border-radius: 4px;
  min-width: 2rem;
  min-height: 2rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.gw-mikser-btn-krok:hover {
  border-color: #7253ed;
  color: #7253ed;
}

.gw-mikser-suwak-etykieta {
  font-size: 0.78rem;
  color: #5c5962;
  white-space: nowrap;
}

.gw-btn-cofnij {
  margin-left: 0.45rem;
  font-weight: 600;
}

.gw-mikser-status-wysylki[hidden] {
  display: none;
}

/* === RESPONSYWNOŚĆ MOBILE I DOTYK === */
@media (max-width: 860px) {
  .gw-mikser-modal-tlo {
    padding: 0;
    align-items: stretch;
  }

  .gw-mikser-modal {
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .gw-mikser-naglowek {
    padding: 0.6rem 0.85rem;
  }

  .gw-mikser-naglowek .gw-modal-zamknij {
    min-width: 44px;
    min-height: 44px;
    padding: 0 0.85rem;
  }

  .gw-mikser-podtytul {
    display: none;
  }

  .gw-mikser-wskazowka-polaczenie {
    display: none;
  }

  .gw-mikser-cialo {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 0.6rem 0.75rem;
    gap: 0.6rem;
  }

  .gw-mikser-kol-podglad {
    flex: 0 0 auto;
    gap: 0.4rem;
  }

  .gw-mikser-ramka-podgladu {
    max-width: min(220px, 28dvh);
    margin: 0 auto;
  }

  .gw-mikser-btn-zwin-podglad {
    display: inline-flex;
    align-items: center;
  }

  .gw-mikser-modal.gw-mikser-podglad-zwiniety .gw-mikser-ramka-podgladu,
  .gw-mikser-modal.gw-mikser-podglad-zwiniety .gw-mikser-stan-podgladu {
    display: none;
  }

  .gw-mikser-stan-podgladu {
    font-size: 0.74rem;
    padding: 0.3rem 0.5rem;
  }

  .gw-mikser-modal.gw-mikser-tryb-mapa .gw-mikser-kol-podglad {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  }

  .gw-mikser-modal.gw-mikser-tryb-mapa .gw-mikser-kol-lista {
    display: none;
  }

  .gw-mikser-kol-lista {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  }

  .gw-mikser-warstwy {
    max-height: none;
    overflow-y: visible;
    padding-right: 0;
  }

  .gw-minimapa-canvas-wrap {
    max-width: 100%;
  }
}

@media (max-width: 860px) and (max-height: 620px) {
  .gw-mikser-ramka-podgladu {
    max-width: 145px;
  }

  .gw-mikser-stan-podgladu {
    display: none;
  }
}

@media (max-width: 768px) {
  #galeria-warstw-app input[type="search"],
  #galeria-warstw-app input[type="text"],
  #galeria-warstw-app select {
    font-size: 16px;
  }

  .gw-pasek-grup {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.2rem 1.4rem 0.45rem 0;
    margin: 0 -0.25rem 0.45rem;
    scroll-snap-type: x proximity;
  }

  .gw-pasek-grup:not(.na-koncu) {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent 100%);
  }

  .gw-pasek-grup::-webkit-scrollbar {
    display: none;
  }

  .gw-chip-grupa {
    flex: 0 0 auto;
    scroll-snap-align: start;
    border: 1px solid #d5d0d8;
    background: #ffffff;
    color: #27262b;
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    min-height: 40px;
    font-size: 0.84rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
  }

  .gw-chip-grupa.aktywny {
    background: #7253ed;
    border-color: #7253ed;
    color: #ffffff;
    font-weight: 600;
  }

  .gw-modal-tlo {
    padding: 0;
    align-items: stretch;
  }

  .gw-modal {
    max-width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .gw-modal-mobile-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #e6e1e8;
    background: #f8fafc;
    flex-shrink: 0;
  }

  .gw-modal-mobile-tytul {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 auto;
  }

  .gw-modal-mobile-licznik {
    font-size: 0.76rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .gw-modal-mobile-top .gw-modal-zamknij {
    min-width: 42px;
    min-height: 42px;
    font-size: 1.4rem;
  }

  .gw-modal-cialo {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .gw-modal-obraz-kol {
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid #e6e1e8;
    overflow: visible;
    flex-shrink: 0;
  }

  .gw-modal-tab {
    flex: 1 1 0;
    justify-content: center;
    min-height: 42px;
    font-size: 0.84rem;
  }

  .gw-modal-panel-probka,
  .gw-modal-panel-zasieg {
    min-height: 0;
    padding: 0.65rem;
  }

  .gw-modal-panel-probka img {
    max-height: 40dvh;
    width: auto;
    max-width: 100%;
  }

  .gw-zasieg-svg {
    max-height: 36dvh;
  }

  .gw-modal-info-kol {
    padding: 0.85rem;
    gap: 0.6rem;
  }

  .gw-modal-info-kol > .gw-modal-naglowek {
    display: none;
  }

  .gw-modal-info-kol > .gw-modal-akcje .gw-modal-nawigacja,
  .gw-modal-info-kol > .gw-modal-akcje .gw-btn-kanapka,
  .gw-modal-info-kol > .gw-modal-akcje .gw-btn-dodaj-modal {
    display: none;
  }

  .gw-modal-mobile-stopka {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e6e1e8;
    background: #ffffff;
    flex-shrink: 0;
  }

  .gw-modal-mobile-nav {
    min-width: 48px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
  }

  .gw-modal-mobile-miks {
    flex: 1 1 auto;
    min-height: 44px;
    font-size: 0.88rem;
  }

  .gw-modal-mobile-stopka .gw-btn-dodaj-modal {
    min-height: 44px;
    padding: 0 0.85rem;
  }

  .gw-btn-prosty,
  .gw-btn-glowny,
  .gw-btn-zielony {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .gw-mikser-przyciski-kolejnosci button {
    min-width: 2.35rem;
    min-height: 2.35rem;
    font-size: 0.9rem;
  }

  .gw-mikser-btn-krok {
    min-width: 2.4rem;
    min-height: 2.4rem;
  }

  .gw-minimapa-narzedzia button,
  .gw-minimapa-skroty button {
    min-height: 38px;
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
  }

  .gw-mikser-suwak-grupa input[type="range"] {
    height: 28px;
  }
}

@media (max-width: 600px) {
  #galeria-warstw-app {
    padding-bottom: 4.5rem;
  }

  .gw-mikser-wiersz-gora {
    align-items: flex-start;
  }

  .gw-mikser-tytul-warstwy {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.28;
  }

  .gw-mikser-zbior-etykieta {
    display: none;
  }

  .gw-mikser-suwak-grupa {
    flex: 1 1 100%;
  }

  .gw-mikser-suwak-grupa input[type="range"] {
    min-width: 110px;
    height: 36px;
  }

  .gw-panel-filtrow {
    top: 0;
    padding: 0.6rem 0.65rem;
    margin: 0.75rem 0 0.55rem;
    gap: 0.5rem;
  }

  .gw-wiersz-gorny {
    flex-wrap: nowrap;
    gap: 0.45rem;
  }

  .gw-szukaj {
    min-width: 0;
    flex: 1 1 auto;
    min-height: 44px;
  }

  .gw-btn-filtry-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .gw-wiersz-gorny .gw-select-grupa {
    display: none;
  }

  .gw-filtry-rozwijane {
    display: none;
    border-top: 1px solid #e6e1e8;
    padding-top: 0.6rem;
  }

  .gw-filtry-rozwijane.otwarte {
    display: block;
  }

  .gw-btn-filtr {
    min-height: 38px;
    padding: 0.35rem 0.75rem;
    font-size: 0.84rem;
  }

  .gw-siatka {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }

  .gw-siatka.gw-siatka-duza {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .gw-siatka:not(.gw-siatka-duza) .gw-tresc-karty {
    padding: 0.5rem 0.55rem 0.55rem;
  }

  .gw-siatka:not(.gw-siatka-duza) .gw-nazwa-warstwy {
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .gw-siatka:not(.gw-siatka-duza) .gw-meta-karty {
    font-size: 0.71rem;
  }

  .gw-siatka:not(.gw-siatka-duza) .gw-odznaka {
    font-size: 0.62rem;
    padding: 0.12rem 0.35rem;
  }

  .gw-siatka:not(.gw-siatka-duza) .gw-odznaka-zasieg {
    display: none;
  }

  .gw-akcje-karty {
    flex-direction: column;
    gap: 0.35rem;
  }

  .gw-btn-kanapka,
  .gw-akcje-karty .gw-btn-dodaj {
    min-height: 40px;
    font-size: 0.78rem;
    padding: 0.35rem 0.45rem;
  }

  .gw-mikser-dok {
    bottom: calc(0.45rem + env(safe-area-inset-bottom, 0px));
    padding: 0.5rem 0.65rem;
    gap: 0.4rem;
    flex-wrap: nowrap;
  }

  .gw-mikser-dok-info > strong,
  .gw-mikser-dok-opis,
  .gw-mikser-dok-akcje-pelne .gw-btn-zielony {
    display: none;
  }

  .gw-mikser-dok.pusty {
    width: fit-content;
    margin-left: auto;
    padding: 0.4rem 0.6rem;
  }

  .gw-mikser-dok.pusty .gw-mikser-badge {
    display: none;
  }
}

@media (max-width: 480px) {
  .gw-modal-tabela,
  .gw-modal-tabela tbody,
  .gw-modal-tabela tr,
  .gw-modal-tabela th,
  .gw-modal-tabela td {
    display: block;
    width: 100%;
  }

  .gw-modal-tabela tr {
    padding: 0.4rem 0;
    border-bottom: 1px solid #eeebee;
  }

  .gw-modal-tabela th,
  .gw-modal-tabela td {
    border-bottom: none;
    padding: 0.1rem 0;
    overflow-wrap: anywhere;
  }

  .gw-modal-tabela th {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
}

