/* === 321x.pl – Patches (nie modyfikuj starego style.css, wczytaj ten plik po nim) === */

/* =========================================================
   1) MODALE – close / okno
   ========================================================= */

/* Ujednolicone, estetyczne "X" do zamykania modali i okienek */
.modal-close {
  --btn-size: 34px;
  position: absolute;
  top: 10px;
  right: 10px;
  width: var(--btn-size);
  height: var(--btn-size);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: #334155; /* slate-700 */
  transition: transform .12s ease, box-shadow .12s ease, color .12s ease, background .12s ease;
}
.modal-close:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 10px rgba(0,0,0,.12);
  color: #0f172a; /* slate-900 */
  background: #f8fafc; /* slate-50 */
}
.modal-close:active {
  transform: scale(0.96);
}

/* Delikatne zaokrąglenie i cień dla okna modala */
.modal-window {
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(2,6,23,.18);
  background: #fff;
}

/* Instrukcje zawsze nad innymi modalami (np. Ustawienia użytkownika) */
.modal-backdrop.modal-backdrop--instructions {
  z-index: 11000 !important;
}
.modal-backdrop.modal-backdrop--instructions .modal-window {
  z-index: 11001 !important;
}

/* =========================================================
   2) OBRAZKI / KARTY – spójne miniatury
   ========================================================= */

.products-grid img,
.product-card img,
.card img,
.gallery-grid img,
.product-modal-img {
  width: 100% !important;
  height: auto;
  max-width: 100%;
  max-height: 90vh;

  aspect-ratio: auto;        /* ❗ NIE wymuszamy kadru */
  object-fit: contain;       /* ❗ NIC NIE UCINAMY */
  object-position: center;

  display: block;
  background: #fff;
  border-radius: 12px;
}

.product-card,
.products-grid .card {
  display: flex;
  flex-direction: column;
}
.products-grid .card .card-body,
.product-card .card-body {
  margin-top: .5rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

/* Stopka modala produktu – lepsze układanie */
.product-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
}
.product-modal-footer > button {
  flex: 0 1 220px;
  min-width: 180px;
}

/* =========================================================
   3) COOKIE CONSENT — zawsze na wierzchu
   ========================================================= */

.modal-backdrop.consent {
  position: fixed;
  inset: 0;
  z-index: 20000 !important;
}
.modal-backdrop.consent .modal-window {
  position: relative;
  z-index: 20001 !important;
}
body.consent-blocked .modal-backdrop.consent,
body.consent-blocked .modal-backdrop.consent * {
  pointer-events: auto !important;
  opacity: 1 !important;
}

/* Kontakt dropdown */
.pm__btn-primary + div button {
  font-size: 0.95rem;
}

/* =========================================================
   4) INBOX / CHAT – JEDNA wersja (bez duplikatów)
   ========================================================= */

/* okno inbox */
.inbox-modal {
  width: 90vw;
  max-width: 900px;

  height: 70vh !important;        /* ⬅️ ważne: nadpisuje height:auto !important z .modal-window */
  max-height: 70vh !important;    /* ⬅️ trzyma okno w ryzach */
  overflow: hidden !important;    /* ⬅️ scroll ma być w środku (threads / chat), nie na całym modalu */

  display: flex;
  flex-direction: column;
}

/* header */
.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
}

/* tabs */
.inbox-tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
}
.inbox-tab {
  flex: 1;
  padding: 8px;
  font-size: 14px;
  background: #f9fafb;
  border: none;
  cursor: pointer;
}
.inbox-tab.active {
  background: #fff;
  font-weight: 600;
  border-bottom: 2px solid #4f46e5;
}

/* body */
.inbox-body {
  flex: 1 1 auto;
  min-height: 0;      /* ✅ klucz: pozwala dzieciom (threads/chat) się przewijać */
  display: flex;
  overflow: hidden;
}

/* lista wątków */
.inbox-threads {
  flex: 1 1 auto;                 /* ✅ wypełnia resztę lewej kolumny */
  min-height: 0;                  /* ✅ klucz */
  overflow-y: auto;               /* ✅ pojawi się suwak */
  -webkit-overflow-scrolling: touch;
}

.thread-item {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: background 0.15s ease;
}
.thread-item:hover {
  background: #eef2ff;
}
.thread-item.active {
  background: #e0e7ff;
  border-left: 4px solid #4f46e5;
}

.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.thread-user {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
}
.thread-badge {
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  padding: 0 6px;
  border-radius: 999px;
}

.thread-preview {
  font-size: 13px;
  color: #374151;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thread-product {
  font-size: 12px;
  margin-top: 4px;
  color: #6b7280;
}
.thread-product-link {
  color: #4f46e5;
  text-decoration: none;
  cursor: pointer;
}
.thread-product-link:hover {
  text-decoration: underline;
}
.thread-date {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

/* chat area */
.inbox-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
}

.chat-empty { color: #9ca3af; font-size: 14px; }
.chat-placeholder { font-size: 14px; }

.chat-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.chat-header {
  padding: 14px 16px;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  background: #f9fafb;
}

.chat-messages {
  padding: 16px;
  background: #f3f4f6;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  overflow-y: auto;
}

.chat-bubble {
  max-width: 65%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chat-bubble.theirs {
  align-self: flex-start;
  background: #fff;
  border-top-left-radius: 4px;
}
.chat-bubble.mine {
  align-self: flex-end;
  background: #4f46e5;
  color: #fff;
  border-top-right-radius: 4px;
}
.chat-date {
  font-size: 11px;
  margin-top: 6px;
  color: #6b7280;
}
.chat-bubble.mine .chat-date {
  color: rgba(255,255,255,0.75);
}

.chat-reply {
  padding: 12px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
  display: flex;
  gap: 10px;
}
.chat-reply textarea {
  resize: none;
  min-height: 44px;
}
.chat-reply button {
  min-width: 90px;
}

/* =========================================================
   5) INBOX – MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .inbox-body { flex-direction: column; }

  /* lista */
  .inbox-left {
    width: 100%;
    display: block;
  }

  /* rozmowa */
  .inbox-chat {
    width: 100%;
    display: none;
  }

  .inbox-chat.mobile-active { display: flex; }
  .inbox-left.mobile-hidden { display: none; }

  .chat-back-btn {
    background: none;
    border: none;
    font-size: 18px;
    margin-right: 8px;
    cursor: pointer;
  }
}

/* Inbox fullscreen + ogólne modale na mobile (padding tła) */
@media (max-width: 768px) {

  .modal-backdrop {
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
  }

  .modal-window.inbox-modal {
    width: 100vw !important;
    height: 100svh !important;
    max-width: 100vw !important;
    max-height: 100svh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
  }

  .inbox-header { flex: 0 0 auto; }

  .inbox-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow: hidden;
  }

  .inbox-left,
  .inbox-chat {
    width: 100% !important;
    max-width: 100% !important;
  }

  .inbox-threads,
  .chat-messages {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Klawiatura mobilna – zachowanie inputa w czacie */
@media (max-width: 768px) {
  .chat-reply {
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 20;
  }

  body.keyboard-open .chat-reply {
    position: fixed;
    left: 0;
    right: 0;
    bottom: env(safe-area-inset-bottom, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  body.keyboard-open .chat-messages {
    padding-bottom: 140px;
  }
}

/* TYLKO inbox – dokładne podniesienie pod klawiaturę (JS ustawia --keyboard-height) */
@media (max-width: 768px) {
  body.keyboard-open-inbox .modal-window.inbox-modal {
    padding-bottom: var(--keyboard-height, 0px);
    height: calc(100svh - var(--keyboard-height, 0px)) !important;
  }

  body.keyboard-open-inbox .chat-reply {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--keyboard-height, 0px);
    background: #fff;
    z-index: 50;
  }

  body.keyboard-open-inbox .chat-messages {
    padding-bottom: 160px;
  }
}

/* Inne fullscreen modale na mobile */
@media (max-width: 768px) {
  .modal-window.inbox-modal,
  .modal-window.product-modal-full {
    width: 100vw !important;
    height: 100svh !important;
    max-height: 100svh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
}

/* Małe ekrany – łagodniejsze zachowanie absolutów w modalach */
@media (max-width: 640px) {
  .modal-window { overflow-y: auto; }

  .modal-window .absolute {
    position: static !important;
    margin-top: 8px;
  }
}

/* =========================================================
   6) ONBOARDING / DODAWANIE – CZYSTY SYSTEM
   ========================================================= */

/* Ostrzeżenie o prywatności */
.privacy-warning {
  color: #dc2626; /* Tailwind red-600 */
}

/* Stała wysokość przycisków w stopce modala */
.modal-window .btn-primary,
.modal-window .btn-secondary {
  min-height: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bez brzydkich ringów na btn-primary w modalach */
.modal-window button.btn-primary:focus,
.modal-window button.btn-primary:focus-visible,
.modal-window button.btn-primary:active {
  outline: none !important;
  box-shadow: none !important;
}

/* ===== MOBILE ONBOARDING (sticky hint) ===== */
@keyframes floatHint {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}

.mobile-onboarding-hint {
  position: sticky;
  top: 64px;
  z-index: 50;

  margin: 0 auto 8px auto;
  width: fit-content;
  max-width: 90vw;

  padding: 10px 18px;
  border-radius: 9999px;

  background: rgba(79,70,229,0.92);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;

  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 20px rgba(79,70,229,0.35);

  animation: floatHint 3s ease-in-out infinite;
  pointer-events: none;
}

/* ===== Przyciski onboarding – “Dodaj” na górze ===== */
.btn-add-onboarding {
  background-color: #4f46e5;
  color: #fff;
  border-radius: 0.75rem;
  font-weight: 600;
  position: relative;
  z-index: 2;
}
.btn-add-onboarding:hover {
  background-color: #4338ca;
}
.btn-add-onboarding::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 0.9rem;
  border: 2px solid rgba(99,102,241,0.6);
  animation: addPulse 1.8s infinite;
  pointer-events: none;
}

@keyframes addPulse {
  0%   { opacity: 1; transform: scale(1); }
  70%  { opacity: 0; transform: scale(1.25); }
  100% { opacity: 0; }
}

/* ===== Puls na przyciskach “AI / Zapisz” (bez ramek dookoła) ===== */
@keyframes rememberPulse {
  0%,100% { filter: brightness(1); }
  50%     { filter: brightness(1.12); }
}
.remember-pulse {
  animation: rememberPulse 1.8s ease-in-out infinite;
}

/* =========================================================
   7) CHMURKI ONBOARDING
   - domyślnie: NAD (strzałka w dół)
   - wariant:   PO PRAWEJ (strzałka w lewo + animacja lewo/prawo)
   ========================================================= */

/* baza – domyślnie chmurka NAD elementem */
.onboarding-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);

  max-width: 260px;
  width: max-content;
  white-space: normal;
  word-break: break-word;
  text-align: center;
  line-height: 1.25;

  padding: 8px 16px;
  border-radius: 9999px;

  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 13px;
  font-weight: 500;

  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 8px 20px rgba(79,70,229,0.35);

  z-index: 50;
  pointer-events: none;
}

/* strzałka w dół (NAD elementem) */
.onboarding-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  width: 0;
  height: 0;

  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #6366f1;
}

/* alias – jeśli w HTML jest onboarding-bubble--above, to tylko koryguj odstęp */
.onboarding-bubble--above {
  bottom: calc(100% + 12px);
}

/* delikatny puls chmurki nad elementem (nie dotyka wariantu --right) */
@keyframes bubblePulse {
  0%   { transform: translateX(-50%) scale(1); }
  50%  { transform: translateX(-50%) scale(1.05); }
  100% { transform: translateX(-50%) scale(1); }
}
.onboarding-bubble:not(.onboarding-bubble--right) {
  animation: bubblePulse 1.8s infinite;
}

/* ===== WARIANT: chmurka po PRAWEJ stronie (np. Galeria) ===== */
@keyframes floatSide {
  0%   { transform: translateY(-50%) translateX(0); }
  50%  { transform: translateY(-50%) translateX(10px); }
  100% { transform: translateY(-50%) translateX(0); }
}

.onboarding-bubble--right {
  top: 50%;
  left: calc(100% + 12px);
  bottom: auto;

  /* animacja boczna */
  animation: floatSide 2.4s ease-in-out infinite;

  /* krótkie teksty przy Galerii niech się nie łamią */
  white-space: nowrap;
  max-width: none;
}

/* strzałka Z LEWEJ (wskazuje kafelek) – nadpisuje dolną strzałkę */
.onboarding-bubble.onboarding-bubble--right::after {
  top: 50%;
  left: -8px;
  transform: translateY(-50%);

  border: none;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #6366f1;
}

/* małe ekrany – chmurki niech nie wychodzą poza ekran */
@media (max-width: 640px) {
  .onboarding-bubble {
    max-width: 90vw;
  }
}
/* ===== MOBILE: chmurka przy Aparat / Galeria ===== */
.onboarding-bubble--mobile-photos {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translate(-50%, -100%);

  max-width: 90vw;
  white-space: nowrap;

  z-index: 30;
}

/* strzałka w dół – wskazuje środek kafelka */
.onboarding-bubble--mobile-photos::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);

  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #6366f1;
}

/* ===== MOBILE: chmurka po PRAWEJ stronie Aparat / Galeria ===== */
@media (max-width: 640px) {

  .onboarding-bubble--mobile-photos {
    top: 50%;
    left: calc(100% + 12px);
    bottom: auto;

    transform: translateY(-50%);
    white-space: nowrap;
    z-index: 40;
  }

  /* strzałka z LEWEJ strony (wskazuje kafelek) */
  .onboarding-bubble--mobile-photos::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    transform: translateY(-50%);

    border: none;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid #6366f1;
  }
}

/* =========================================================
   MODAL: Zamknięcie konkursu – ZAWSZE NA WIERZCHU
   ========================================================= */

.modal-backdrop.modal-freeze-contest {
  position: fixed;
  inset: 0;
  z-index: 30000 !important; /* ⬅️ wyżej niż admin, inbox, wszystko */
}

.modal-freeze-contest-window {
  position: relative;
  z-index: 30001 !important;
}

/* =========================
   ADMIN PANEL – tabele nie mogą wychodzić poza modal
   ========================= */

/* Admin modal ma trzymać się ekranu i nie wypuszczać poziomych overflowów */
.modal-window.max-w-5xl{
  width: min(95vw, 64rem) !important;  /* 64rem = max-w-5xl */
  max-width: 95vw !important;
  overflow-x: hidden !important;       /* klucz: nic nie “wyjdzie bokiem” */
}

/* Wrapper do poziomego scrolla tabel */
.admin-table-scroll{
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ważne: tabela ma się przewijać, nie ściskać */
.admin-table-scroll > table{
  width: max-content;
}
/* ✅ USERS: ta tabela ma się dopasować do modala (żeby nie znikały wiersze przy breakpointach) */
.admin-table-scroll > table.admin-users-table{
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed;
}

.admin-table-scroll > table.admin-users-table th,
.admin-table-scroll > table.admin-users-table td{
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}


/* Tabele w adminie: niech mają stabilny układ i nie rozpychają modala */
.modal-window.max-w-5xl table{
  border-collapse: collapse;
}

/* ✅ USERS: 2 wiersze + ikonki (bez poziomego scrolla) */
.admin-user-icons{
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.admin-ico{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 9999px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 13px;
  line-height: 1;
}

.admin-ico.is-ok{
  color: #15803d;            /* green-700 */
  background: #dcfce7;       /* green-100 */
  border-color: #86efac;     /* green-300 */
}

.admin-ico.is-warn{
  color: #b45309;            /* amber-700 */
  background: #ffedd5;       /* amber-100 */
  border-color: #fdba74;     /* amber-300 */
}

.admin-ico.is-off{
  color: #64748b;            /* slate-500 */
  background: #f1f5f9;       /* slate-100 */
  border-color: #e2e8f0;     /* slate-200 */
}

.admin-ico.admin-ico-text{
  width: auto;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 9999px;
}

.admin-ico.admin-ico-text .is-ok{
  color: #15803d;
}

.admin-ico.admin-ico-text .is-off{
  color: #64748b;
}

.admin-user-stats{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  font-size: 12px;
  line-height: 1.1;
}

.admin-user-stats .muted{
  color: #94a3b8;
  font-weight: 700;
  margin: 0 2px;
}

.admin-user-subrow{
  background: #f8fafc;
}

.admin-user-subrow-grid{
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  font-size: 12px;
  line-height: 1.2;
}

.admin-user-subrow-grid .k{
  color: #64748b;
  font-weight: 700;
}

.admin-user-subrow-grid .v{
  color: #0f172a;
  font-weight: 700;
}


.rotate-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}
.rotate-btn:hover {
  background: rgba(0,0,0,.85);
}


/* ===== IMAGE VIEWER – OBRÓT POD ZDJĘCIEM ===== */

.image-rotate-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 14px;
  padding-bottom: 10px;
}

.rotate-btn-big {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 10px 18px;
  border-radius: 9999px;
  border: none;

  background: #111827; /* prawie czarny */
  color: #fff;

  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.rotate-btn-big:hover {
  background: #000;
}

/* ===== IMAGE VIEWER – ZOOM ===== */

.image-viewer-img {
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.image-viewer-img.zoomed {
  cursor: zoom-out;
}
.image-viewer-img {
  cursor: zoom-in;
  user-select: none;
}

.image-viewer-img.zoomed {
  cursor: grab;
}

.image-viewer-img.zoomed.dragging {
  cursor: grabbing;
}

.image-viewer-img {
  touch-action: pan-x pan-y pinch-zoom;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* SEO-only links: widoczne dla Google, NIEKLIKALNE dla usera */
.sr-only {
  pointer-events: none !important;
}

.banner-overlay {
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.75) 0%,
    rgba(0,0,0,0.55) 40%,
    rgba(0,0,0,0.25) 65%,
    rgba(0,0,0,0.05) 100%
  );
}

/* === FIX: menu telefonu MUSI pozostać absolute (mobile) === */
.phone-action-popover {
  position: relative;   /* ⬅️ klucz */
  z-index: auto;        /* ⬅️ klucz */
}

/* ===== BANER KONKURSU ===== */
.contest-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 2px solid #f59e0b;
  box-shadow: 0 10px 30px rgba(245,158,11,.25);
  transition: transform .15s ease, box-shadow .15s ease;
}

.contest-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(245,158,11,.35);
}

.contest-banner-left {
  font-size: 26px;
}

.contest-banner-center {
  flex: 1;
}

.contest-banner-title {
  font-size: 20px;
  font-weight: 800;
  color: #92400e;
  line-height: 1.15;
}

.contest-banner-title span {
  color: #dc2626;
  font-size: 24px;
}

.contest-banner-sub {
  font-size: 13px;
  color: #78350f;
  line-height: 1.2;
  margin-top: 2px;
}

.contest-banner-right {
  font-weight: 700;
  color: #92400e;
  white-space: nowrap;
}

/* MOBILE */
@media (max-width: 640px) {
  .contest-banner {
    flex-direction: column;
    text-align: center;
    padding: 10px 14px;
    gap: 8px;
  }
  .contest-banner-left {
    font-size: 22px;
  }
  .contest-banner-title {
    font-size: 18px;
  }
  .contest-banner-title span {
    font-size: 22px;
  }
  .contest-banner-right {
    margin-top: 6px;
  }
}

/* ===== FIX: usuń białą przerwę pod banerem konkursu ===== */
.list-title {
  margin-top: 12px !important;
}

.contest-banner {
  margin-bottom: 12px !important;
}

/* ✅ MENU telefonu w kartach GRID (item-card) nie może być ucinane */
.item-card {
  overflow: visible !important;
}

/* ===== STICKY MINI BAR – REKLAMA (NAD KONKURSEM) ===== */
.ads-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 510 !important;

  height: 26px;
  line-height: 26px;

  max-width: 72rem;
  margin: 0 auto;
  padding: 0 14px;

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

  text-align: center;

  background: #fff;
  border: 1px solid #94a3b8;
  border-radius: 0 0 14px 14px;

  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  cursor: pointer;
}


/* ===== STICKY MINI BAR – NAD MENU ===== */
.contest-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 35;

  height: 26px;
  line-height: 26px;

  max-width: 72rem;
  margin: 0 auto;
  padding: 0 14px;

  display: flex;              /* ⬅️ KLUCZ */
  align-items: center;        /* pion */
  justify-content: center;    /* poziom */

  text-align: center;         /* backup */

  background: #fff;
  border: 1px solid #f59e0b;
  border-radius: 0 0 14px 14px;

  font-size: 12.5px;
  font-weight: 600;
  color: #92400e;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  box-shadow: 0 2px 6px rgba(0,0,0,.08);
  cursor: pointer;
}

/* DOMYŚLNIE: brak sticky barów */
.action-bar{
  top: 0 !important;
}

/* gdy widać sticky REKLAMY */
html.has-ads-sticky .action-bar{
  top: 26px !important;
}

/* gdy widać sticky KONKURSU (a reklamy nie) */
html.has-contest-sticky .action-bar{
  top: 26px !important;
}

/* gdy widać OBA sticky bary naraz */
html.has-ads-sticky.has-contest-sticky .action-bar{
  top: 52px !important;
}

/* konkurs ma zejść pod reklamę, jeśli reklama sticky jest widoczna */
html.has-ads-sticky .contest-sticky-bar{
  top: 26px !important;
}


/* mobile */
@media (max-width: 640px) {
  .ads-sticky-bar{
    height: 24px;
    line-height: 24px;
    font-size: 12px;
  }

  .contest-sticky-bar {
    height: 24px;
    line-height: 24px;
    font-size: 12px;
  }

  html.has-ads-sticky .action-bar{
    top: 24px !important;
  }

  html.has-contest-sticky .action-bar{
    top: 24px !important;
  }

  html.has-ads-sticky.has-contest-sticky .action-bar{
    top: 48px !important;
  }

  html.has-ads-sticky .contest-sticky-bar{
    top: 24px !important;
  }
}

/* odstępy wokół kwot w pasku */
.contest-sticky-bar strong.money {
  margin: 0 6px;
  font-weight: 800;
}

/* 🟡 Ogłoszenia zalogowanego użytkownika */
.my-own-product {
  border-color: #facc15 !important; /* Tailwind yellow-400 */
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.6);
}

/* === FIX: identyczna wysokość przycisków akcji w kartach === */
.item-card .mt-1.flex.gap-2 > button {
  height: 32px !important;
  min-height: 32px !important;
  line-height: 32px !important;

  padding-top: 0 !important;
  padding-bottom: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  vertical-align: middle !important;
}

/* === FIX: identyczna wysokość i wyrównanie przycisków akcji w kartach (GRID) === */
.item-card .card-action-buttons > button{
  height: 32px !important;
  min-height: 32px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  line-height: 1 !important;   /* ważne: NIE 32px */
  box-sizing: border-box !important;
}

/* żeby ikony SVG nie „pływały” */
.item-card .card-action-buttons > button svg{
  display: block !important;
}
/* FIX: nie przesuwaj niebieskiego przycisku w dół w parze Zadzwoń/Napisz */
.item-card .card-action-buttons > button.bg-blue-500{
  margin-top: 0 !important;
}
/* === Odstęp przycisków od górnej linii (hr) w kartach === */
.item-card .card-action-buttons {
  margin-top: 8px;   /* możesz dać 6–10px wg uznania */
}

/* HIERARCHIA WARSTW – JEDYNE ŹRÓDŁO PRAWDY */
.contest-sticky-bar {
  position: sticky;
  top: 0;
  z-index: 510 !important;
}

.action-bar {
  position: sticky;
  top: 26px; /* jak masz */
  z-index: 500 !important;
}

/* grid ogłoszeń ZAWSZE pod menu */
.products-grid{
  position: relative;
  z-index: 1;
}

/* karty NIE mogą mieć własnego z-index, bo dropdowny wpadają pod kolejne karty */
.item-card{
  position: relative;
  z-index: auto;
}

/* prawa kolumna */
.item-card--list > .p-4 {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

/* stopka zawsze na dole */
.item-card--list .mt-auto {
  margin-top: auto;
}
/* =========================================================
   LISTA (1 kolumna) – RAMKA NA OBRAZ (nie nachodzi na tekst)
   ========================================================= */

.item-card--list{
  overflow: hidden; /* klucz: obrócony obraz nie wyjdzie poza kartę */
}

/* ramka obrazka (desktop) */
.item-card--list .list-img-wrap{
  width: 25%;
  max-width: 160px;
  height: 120px;
  margin: 8px;

  background: #fff;
  border-radius: 10px;
  overflow: hidden;

  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;
}

.item-card--list .list-img-wrap > img.item-img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* MOBILE – obraz nad treścią, ale w ramce 200px */
@media (max-width: 640px){
  .item-card--list{
    flex-direction: column;
  }

  .item-card--list .list-img-wrap{
    width: 100%;
    max-width: 100%;
    height: 200px;
  }
}
/* =========================================================
   ADMIN PANEL — ma być POD podglądem produktu (.pm = 1000)
   ========================================================= */

.modal-backdrop.modal-admin{
  z-index: 900 !important;   /* niżej niż .pm (1000) */
}

.modal-window.modal-admin-window{
  position: relative;
  z-index: 901 !important;
}

/* ✅ FIX: admin modal musi mieć własny scroll (żeby lista nie “znikała” na mniejszych ekranach) */
.modal-backdrop.modal-admin{
  align-items: flex-start !important;
  padding-top: 16px !important;
  padding-bottom: 16px !important;
}

.modal-window.modal-admin-window{
  max-height: calc(100vh - 32px) !important; /* 16px góra + 16px dół */
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
/* ✅ Admin confirm modal (nad panelem admina) */
.admin-confirm-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.admin-confirm-window{
  width: min(480px, 92vw);
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}


/* ✅ PODGLĄD wpisu NAD modalem dodawania (tylko gdy otwieramy preview z formularza) */
body.pm-over-add .pm {
  z-index: 12000 !important;  /* wyżej niż .modal-backdrop (9999) */
}
body.pm-over-add .pm__panel {
  z-index: 12001 !important;
}

/* ✅ Podgląd (preview): przyciski widoczne, ale nieaktywne */
.pm__btn.is-disabled,
.pm__btn-primary.is-disabled,
.pm__btn-danger.is-disabled,
.pm__btn-secondary.is-disabled {
  opacity: 0.45;
  cursor: not-allowed !important;
  pointer-events: none !important;
  filter: grayscale(35%);
}

.search-map {
  width: 100%;
  height: 260px;
  border-radius: 12px;
  overflow: hidden;
}

.geo-suggest-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 99999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
}

.geo-suggest-item{
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
}

.geo-suggest-item:hover{
  background: #f8fafc;
}

.geo-suggest-label{
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}

.geo-suggest-sub{
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.q-suggest-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 99999 !important;

  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);

  overflow: hidden;
  max-height: 550px;
  overflow-y: auto;
}

/* Ikonka mapy w polu lokalizacji (modal dodawania) */
.loc-map-btn{
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
}

.loc-map-btn:hover{
  background: #f9fafb;
}

.loc-map-btn.is-on{
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99,102,241,0.15);
}

/* 🗺️ Podgląd ogłoszenia: ikonka mapy przy lokalizacji */
.pm__loc-row{
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pm__map-btn{
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.pm__map-btn:hover{
  background: #f9fafb;
}

.pm__map-btn.is-disabled{
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(35%);
}

/* 🗺️ Modal mapy w podglądzie ogłoszenia – zawsze nad .pm (również preview pm-over-add) */
.modal-backdrop.pm-map{
  z-index: 13000 !important;
}

.modal-window.pm-map-window{
  z-index: 13001 !important;
}


/* =========================================================
   AI BUTTON — mega widoczny (czerwony + puls + mruganie)
   ========================================================= */

@keyframes aiLoudPulse {
  0%   { filter: brightness(1);    box-shadow: 0 10px 24px rgba(220,38,38,0.30); }
  50%  { filter: brightness(1.12); box-shadow: 0 14px 34px rgba(220,38,38,0.55); }
  100% { filter: brightness(1);    box-shadow: 0 10px 24px rgba(220,38,38,0.30); }
}

@keyframes aiLoudBlink {
  0%, 100% { outline-color: rgba(255,255,255,0.0); }
  50%      { outline-color: rgba(255,255,255,0.65); }
}

.btn-ai-loud {
  background: #dc2626; /* red-600 */
  color: #ffffff;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.2px;

  position: relative;

  animation: aiLoudPulse 1.15s ease-in-out infinite, aiLoudBlink 1.15s ease-in-out infinite;
  outline: 2px solid rgba(255,255,255,0.0);
  outline-offset: 2px;

  transition: filter .12s ease;
}

.btn-ai-loud:hover {
  filter: brightness(1.06);
}

.btn-ai-loud:active {
  transform: none;
}

/* gdy disabled (aiBusy), nie mruga i nie rozprasza */
.btn-ai-loud:disabled,
.btn-ai-loud[disabled] {
  background: #e5e7eb; /* jak btn-secondary */
  color: #374151;
  animation: none !important;
  box-shadow: none !important;
  outline: none !important;
  cursor: not-allowed;
  opacity: 1;
}

/* =========================================================
   AI BUTTON — tooltip + opis dla mobile
   ========================================================= */

.ai-btn-main {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.ai-btn-sub {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.92;
}

/* tooltip (desktop) */
.ai-tip {
  position: relative;
}

.ai-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(360px, 92vw);

  background: rgba(0, 0, 0, 0.92);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.25;
  padding: 10px 12px;
  border-radius: 12px;

  box-shadow: 0 14px 30px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
  z-index: 9999;
}

/* strzałka */
.ai-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 7px solid transparent;
  border-top-color: rgba(0, 0, 0, 0.92);
}

/* pokazuj tooltip na hover i focus (klawiatura) */
.ai-tip:hover .ai-tooltip,
.ai-tip:focus-visible .ai-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

/* mobile: tooltip wyłączony, opis zostaje na przycisku */
@media (max-width: 768px) {
  .ai-tooltip {
    display: none;
  }

  .ai-btn-sub {
    display: block;
  }
}

/* desktop: mały tekst mniej nachalny (może zostać), ale można ukryć jeśli chcesz */
@media (min-width: 769px) {
  .ai-btn-sub {
    opacity: 0.85;
  }
}

/* =========================================================
   ADMIN → MODALE “Wyniki konkursu” (nad admin panelem)
   ========================================================= */

.modal-backdrop.modal-admin-over{
  position: fixed;
  inset: 0;
  z-index: 35000 !important;  /* ⬅️ musi być wyżej niż admin modal */
}

.modal-backdrop.modal-admin-over .modal-window{
  position: relative;
  z-index: 35001 !important;
}
/* ===== SHARE MENU (dropdown przy "Udostępnij") ===== */
.share-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;

  min-width: 190px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);

  padding: 6px;
}

.share-item{
  width: 100%;
  text-align: left;

  padding: 9px 10px;
  border-radius: 10px;

  font-size: 13px;
  line-height: 1.2;

  color: #111827;
  background: transparent;
  border: none;

  cursor: pointer;
}

.share-item:hover{
  background: #f3f4f6;
}

.share-item--copy{
  font-weight: 700;
}
/* ===== KOPERTA NA ZDJĘCIU (prawy górny róg) ===== */
.img-wrap,
.list-img-wrap{
  position: relative;
}

.card-mail-fab{
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 50;

  width: 30px;
  height: 30px;
  border-radius: 9999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.12);
  color: #111827;

  box-shadow: 0 6px 18px rgba(0,0,0,0.16);
  cursor: pointer;
}

.card-mail-fab:hover{
  background: #ffffff;
  transform: scale(1.05);
}

.card-mail-fab:active{
  transform: scale(0.97);
}

/* ===== HOMEPAGE: niższe okienko tytułu listy ===== */
.list-title {
  padding: 10px 14px !important;   /* było 16px */
  margin-bottom: 14px !important;  /* było 24px */
  font-size: 1.55rem !important;   /* było 2rem */
  line-height: 1.15 !important;
}
/* ===== SLOT REKLAMOWY (homepage) ===== */
.ad-slot {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #f8fafc;
  border: 2px dashed #94a3b8;
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
}

.ad-slot-left {
  font-size: 26px;
}

.ad-slot-center {
  flex: 1;
}

.ad-slot-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}

.ad-slot-sub {
  font-size: 13px;
  color: #475569;
  line-height: 1.25;
  margin-top: 2px;
}

.ad-slot-cta {
  display: inline-block;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.ad-slot-cta:hover {
  background: #cbd5e1;
}

/* MOBILE */
@media (max-width: 640px) {
  .ad-slot {
    flex-direction: column;
    text-align: center;
    gap: 8px;
    padding: 10px 14px;
  }

  .ad-slot-left {
    font-size: 22px;
  }

  .ad-slot-cta {
    width: 100%;
    text-align: center;
  }
}
/* ===== ADMIN: REKLAMA (MAPA WOJEWÓDZTW) ===== */
.ads-grid{
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
}

.ads-map-card,
.ads-info-card{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}

.ads-map-title{
  font-weight: 800;
  margin-bottom: 8px;
}

.ads-map{
  width: 100%;
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG województw */
.ads-map svg{
  width: 100%;
  height: 100%;
}

.ads-map .woj{
  cursor: pointer;
  transition: opacity .12s ease, transform .12s ease;
}

.ads-map .woj:hover{
  opacity: .85;
  transform: translateY(-1px);
}

.ads-map .woj.is-active{
  outline: none;
  opacity: 1;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.18));
}

/* MOBILE */
@media (max-width: 900px){
  .ads-grid{
    grid-template-columns: 1fr;
  }
  .ads-map{
    height: 360px;
  }
}
.exif-debug-ui{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.06);
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

/* ===== REWARD BOX (modal zgłoszeń) ===== */
.reward-box{
  margin: 10px 0 14px;
  border: 2px solid #dc2626;
  background: #fff5f5;
  border-radius: 14px;
  padding: 12px 14px;
}

.reward-box-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.reward-box-left{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.reward-box-icon{
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  flex: 0 0 auto;
}

.reward-box-title{
  color: #7f1d1d;
  font-weight: 900;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reward-box-badge{
  background: #dc2626;
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(220,38,38,.18);
  flex: 0 0 auto;
}

.reward-box-text{
  color: #7f1d1d;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.reward-box-text strong{
  font-weight: 900;
}

.reward-box-muted{
  display: block;
  margin-top: 6px;
  color: #991b1b;
  opacity: .9;
}

/* ───────────── RUCH: wykresy admin ───────────── */
.traffic-chart{
  display: flex;
  gap: 8px;
  align-items: flex-end;
  overflow-x: auto;
  padding: 8px 4px;
}
.traffic-col{
  width: 24px;
  flex: 0 0 24px;
  text-align: center;
}
.traffic-bars{
  display: flex;
  gap: 2px;
  align-items: flex-end;
  justify-content: center;
  height: 140px;
}
.traffic-bar{
  width: 10px;
  border-radius: 6px 6px 0 0;
}
.traffic-bar-ai{
  background: #4f46e5;
}
.traffic-bar-manual{
  background: #ef4444;
}
.traffic-day{
  margin-top: 4px;
  font-size: 10px;
  color: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
}


/* =========================================================
   USTAWIENIA (Zaloguj / Ustawienia użytkownika)
   - scroll ma być tylko w treści
   - przyciski zawsze przyklejone na dole
   ========================================================= */

.modal-window.settings-modal-window{
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-window.settings-modal-window .settings-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-window.settings-modal-window .settings-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.modal-window.settings-modal-window .settings-footer{
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
  padding-bottom: 8px;
  z-index: 2;
}

/* =========================================================
   USTAWIENIA: zakładki po lewej (desktop) — FIX szerokości
   ========================================================= */

.modal-window.settings-modal-window .settings-nav-btn{
  display: block;            /* ⬅️ KLUCZ: inaczej “tło” bywa tylko pod tekstem */
  width: 100%;               /* ⬅️ pełna szerokość jak “Wizytówka” */
  box-sizing: border-box;    /* ⬅️ border/padding nie zmieniają szerokości */
}

/* =========================================================
   USTAWIENIA: zakładki po lewej — FULL WIDTH (override)
   ========================================================= */

.modal-window.settings-modal-window .settings-nav{
  padding-right: 0 !important;
}

@media (min-width: 1024px) {
  .modal-window.settings-modal-window .settings-nav{
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
}

/* =========================================================
   EDYCJA (Edytuj/Ukryj) — scroll tylko w treści + przyciski na dole
   ========================================================= */

.modal-window.edit-modal-window{
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  overflow: hidden;
}

.modal-window.edit-modal-window .edit-form{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.modal-window.edit-modal-window .edit-scroll{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.modal-window.edit-modal-window .edit-footer{
  position: sticky;
  bottom: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding-top: 8px;
  padding-bottom: 8px;
  z-index: 2;
}
/* =========================
   NIEAKTYWNY WPIS (właściciel)
   ========================= */

.inactive-product {
  border: 2px solid #dc2626 !important; /* red-600 */
  opacity: 0.55;
  filter: grayscale(1);
  position: relative;
}

.inactive-product::after {
  content: "Wpis nieaktywny";
  position: absolute;
  top: 18px;
  right: -34px;

  transform: rotate(18deg);

  background: rgba(220, 38, 38, 0.95);
  color: #fff;

  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.5px;

  padding: 6px 14px;
  border-radius: 9999px;

  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.22);
  pointer-events: none;
  z-index: 60;
}

/* =========================
   KONKURS OFF (CONTEST_ENABLED=false)
   ========================= */
html.contest-disabled .contest-banner,
html.contest-disabled #contest-sticky-bar,
html.contest-disabled #collector-desktop{
  display: none !important;
}


/* =========================
   HOMEPAGE: Oddaj głos województwu
   ========================= */

#voivodeship-map-home{
  width: 100%;
}

#voivodeship-map-home svg{
  width: 100%;
  height: 260px;
  display: block;
}

#voivodeship-map-home .voiv-battle-woj{
  cursor: pointer;
  transition: opacity .12s ease, transform .12s ease, filter .12s ease;
}

#voivodeship-map-home .voiv-battle-woj:hover{
  transform: translateY(-1px);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
  opacity: 1 !important;
}

#voivodeship-map-home .voiv-battle-woj.is-leader{
  filter: drop-shadow(0 10px 18px rgba(245,158,11,.35));
  opacity: 1 !important;
}

.voiv-rank{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.voiv-rank-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(148,163,184,0.55);
}

.voiv-rank-left{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 10px;
}

.voiv-rank-right{
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
}

/* =========================
   VOIV BATTLE — WOW UI
   ========================= */

.voiv-cta-btn{
  width: 100%;
  border-radius: 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(139,92,246,0.95));
  color: #fff;
  font-weight: 900;
  text-align: left;
  box-shadow: 0 14px 34px rgba(79,70,229,.26);
  border: 1px solid rgba(255,255,255,0.35);
  cursor: pointer;
}
.voiv-cta-btn:hover{
  filter: brightness(1.06);
}
.voiv-cta-sub{
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.92;
}

.voiv-podium{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.voiv-podium-card{
  border-radius: 14px;
  padding: 10px 10px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(148,163,184,0.55);
  box-shadow: 0 10px 24px rgba(15,23,42,.06);
}
.voiv-podium-card.place-1{
  border: 2px solid rgba(245,158,11,0.9);
  box-shadow: 0 14px 34px rgba(245,158,11,.18);
}
.voiv-podium-medal{ font-size: 20px; }
.voiv-podium-name{ font-weight: 900; font-size: 12px; color: #0f172a; margin-top: 4px; }
.voiv-podium-score{ font-size: 11px; color: #334155; margin-top: 1px; font-weight: 700; }

.voiv-row{
  border-radius: 12px;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(148,163,184,0.55);
  padding: 8px 10px;
  margin-bottom: 8px;
}
.voiv-row.is-top3{
  border-color: rgba(245,158,11,0.55);
}
.voiv-left{
  display: flex;
  align-items: center;
  gap: 8px;
}
.voiv-badge{ width: 18px; text-align: center; }
.voiv-place{ font-weight: 900; color: #0f172a; }
.voiv-name{ font-weight: 800; color: #0f172a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.voiv-right{
  float: right;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
  color: #0f172a;
}
.voiv-bar{
  height: 8px;
  border-radius: 9999px;
  background: rgba(148,163,184,0.28);
  overflow: hidden;
  margin-top: 6px;
}
.voiv-bar-fill{
  height: 100%;
  border-radius: 9999px;
  background: rgba(99,102,241,0.95);
}
.voiv-sub{
  margin-top: 4px;
  font-size: 11px;
  color: #475569;
  font-weight: 700;
}

.voiv-history{
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
  border: 1px solid rgba(148,163,184,0.45);
  padding: 8px 10px;
}
.voiv-history-row{
  display: grid;
  grid-template-columns: 22px 1fr 60px 120px;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(148,163,184,0.45);
}
.voiv-history-row:last-child{ border-bottom: 0; }
.voiv-history-name{ font-weight: 900; }
.voiv-history-score{
  text-align: right;
  font-weight: 900;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, "Roboto Mono", monospace;
}
.voiv-history-date{ text-align: right; color: #64748b; font-size: 11px; }

#voivodeship-map-home .voiv-battle-woj.is-me{
  filter: none;
  opacity: 1 !important;
}

/* =========================
   VOIV BATTLE — TRYB PODSTAWOWY (zostaje tylko mapa)
   nic nie usuwamy z HTML, tylko chowamy
   ========================= */

.voiv-battle-minimal #voivodeship-ranking-home{
  display: none !important;
}

.voiv-battle-minimal #voivodeship-last-winner{
  display: none !important;
}

.voiv-battle-minimal #voivodeship-battle-card .mt-3.text-xs.text-slate-700{
  display: none !important;
}

/* powiększ mapę w wersji podstawowej */
.voiv-battle-minimal #voivodeship-map-home svg{
  height: 320px !important;
}

/* ✅ MOBILE FULLSCREEN: nadpisz 320px i zrób prawdziwy fullscreen mapy */
@media (max-width: 768px){
  html.voiv-mobile-open .voiv-battle-minimal #voivodeship-map-home{
    flex: 1 1 auto;
    min-height: 0;
  }

  html.voiv-mobile-open .voiv-battle-minimal #voivodeship-map-home svg{
    height: 62svh !important;
    min-height: 360px !important;
    width: 100% !important;
    display: block !important;
  }
}
/* lider województw — mocniej niż tylko "opacity" */
@keyframes voivLeaderPulse{
  0%   { transform: scale(1);   filter: drop-shadow(0 10px 18px rgba(245,158,11,.25)); }
  50%  { transform: scale(1.03); filter: drop-shadow(0 14px 24px rgba(245,158,11,.40)); }
  100% { transform: scale(1);   filter: drop-shadow(0 10px 18px rgba(245,158,11,.25)); }
}

#voivodeship-map-home .voiv-battle-woj.is-leader{
  opacity: 1 !important;

  /* ✅ pulsowanie lidera */
  animation: voivLeaderPulse 1.35s ease-in-out infinite;

  /* żeby skala działała dobrze na SVG */
  transform-box: fill-box;
  transform-origin: center;

  /* ✅ bez “grubego stroke” (to robiło wrażenie, że coś jest specjalnie czerwone) */
  stroke: rgba(0,0,0,0.25);
  stroke-width: 1.2;
}


/* hover — delikatny (zostaje), ale “prawdziwe” powiększenie robi klasa .is-hovered */
#voivodeship-map-home .voiv-battle-woj:hover{
  transform: translateY(-1px) scale(1.01);
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.20));
  opacity: 1 !important;
}

/* ✅ HOVER x2 – TYLKO klon w warstwie hover (żeby inne woj. nie nachodziły) */
#voivodeship-map-home svg #voiv-hover-layer .voiv-battle-woj.is-hovered{
  transform: scale(2) !important;
  transform-box: fill-box;
  transform-origin: center;
  filter: drop-shadow(0 16px 22px rgba(0,0,0,.28));
  opacity: 1 !important;
  pointer-events: none;
}

/* ✅ etykieta z danymi w SVG */
#voivodeship-map-home svg .voiv-hover-label{
  pointer-events: none;
}

/* ❌ nie rysujemy już białego tła */
#voivodeship-map-home svg .voiv-hover-label rect{
  display: none;
}

/* ✅ większy, czarny tekst + jasny obrys (czytelny na kolorach woj.) */
#voivodeship-map-home svg .voiv-hover-label text{
  fill: #0b0b0b;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  font-weight: 900;
  font-size: 22px;

  /* obrys dla czytelności w SVG */
  paint-order: stroke;
  stroke: rgba(255,255,255,0.94);
  stroke-width: 4;
  stroke-linejoin: round;
}

/* =========================
   VOIVODE BATTLE — bez flasha (domyślnie ukryte)
   ========================= */
html:not(.voiv-battle-ready) #voivodeship-battle-card{
  display: none !important;
}

/* ✅ MOBILE MODAL: karta mapy MA BYĆ WIDOCZNA nawet podczas ładowania (gdy voiv-battle-ready jest zdjęte) */
@media (max-width: 768px){
  html.voiv-mobile-open #voivodeship-battle-card,
  html.voiv-mobile-open:not(.voiv-battle-ready) #voivodeship-battle-card{
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 40001 !important;
    width: 100vw !important;
    height: 100svh !important;
    max-width: 100vw !important;
    max-height: 100svh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    overflow-y: auto !important;
    padding-top: 56px !important;
    pointer-events: auto !important;
  }

  html.voiv-mobile-open #voivodeship-map-home,
  html.voiv-mobile-open #voivodeship-map-home svg{
    pointer-events: auto !important;
  }
}

/* =========================================================
   DODAWANIE (Dodaj wpis) — większa wysokość + scroll tylko w treści
   ========================================================= */

.modal-window.add-entry-modal-window{
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  overflow: hidden;
}

/* FORM w dodawaniu ma dostać układ kolumnowy */
.modal-window.add-entry-modal-window #addForm{
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

/* ✅ ten wrapper już masz w HTML: <div x-show="!fastAddFlow || fastAddExpanded" x-cloak> */
.modal-window.add-entry-modal-window #addForm > div[x-show]{
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}
/* =========================
   DYMEK: narrator (mała postać)
   ========================= */

.voiv-game-ticker-row{
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.voiv-game-ticker-narrator{
  width: 56px;
  height: 56px;
  position: relative;
  flex: 0 0 56px;

  filter: drop-shadow(0 10px 18px rgba(0,0,0,0.18));
}

.voiv-game-ticker-narrator .narrator-img{
  position: absolute;
  inset: 0;
  width: 56px;
  height: 56px;
  object-fit: contain;
  display: block;
}

.voiv-game-ticker-narrator .narrator-talk{
  opacity: 0;

  /* ✅ pokaż tylko “usta” z obrazka talk, żeby nie migała cała twarz */
  clip-path: inset(58% 0 0 0);
  pointer-events: none;
}

/* ✅ “Mówienie”: przełączanie talk ON/OFF, ale idle zawsze 100% */
@keyframes narratorMouth{
  0%   { opacity: 0; }
  49%  { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 1; }
}

.voiv-game-ticker-narrator.is-talking .narrator-talk{
  animation: narratorMouth 0.22s steps(2, end) infinite;
}

/* ❌ nie przygaszamy idle — inaczej wygląda jakby znikał */
.voiv-game-ticker-narrator .narrator-idle{
  opacity: 1;
}

.voiv-game-ticker-bubble:after{
  content: "";
  position: absolute;
  left: 28px;
  top: -7px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid rgba(15, 23, 42, 0.14);
  border-top: 1px solid rgba(15, 23, 42, 0.14);
  transform: rotate(45deg);
}

.voiv-game-ticker-text{
  font-size: 12px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.86);
  font-weight: 700;
}

.voiv-game-ticker-text .muted{
  font-weight: 800;
  color: rgba(15, 23, 42, 0.70);
}

.voiv-game-ticker-text .strong{
  font-weight: 900;
}

/* =========================
   DYMEK: komunikator gry (home)
   ========================= */

.voiv-game-ticker{
  margin-top: 10px;
}

.voiv-game-ticker.hidden{
  display: none !important;
}

.voiv-game-ticker-bubble{
  position: relative;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.voiv-game-ticker-bubble:after{
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid rgba(15, 23, 42, 0.14);
  border-bottom: 1px solid rgba(15, 23, 42, 0.14);
  transform: translateY(-50%) rotate(45deg);
}

.voiv-game-ticker-text{
  font-size: 12px;
  line-height: 1.35;
  color: rgba(15, 23, 42, 0.86);
  font-weight: 700;
}

.voiv-game-ticker-text .muted{
  font-weight: 800;
  color: rgba(15, 23, 42, 0.70);
}

.voiv-game-ticker-text .strong{
  font-weight: 900;
}

#voivodeship-map-home .voiv-battle-woj.is-strongest{
  opacity: 1 !important;
  animation: voivLeaderPulse 1.35s ease-in-out infinite;

  transform-box: fill-box;
  transform-origin: center;

  stroke: rgba(0,0,0,0.25);
  stroke-width: 1.2;
}

/* ADMIN → Ruch: trzeci słupek (wejścia do gry) */
.traffic-bar-game{
  background: #22c55e;
}

/* Action-bar: równe wysokości i idealne wyrównanie w wierszu */
.action-bar button,
.action-bar a{
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  margin-top: 0 !important;
}

/* =========================================================
   USTAWIENIA: zakładki — desktop + mobile
   ========================================================= */

.modal-window.settings-modal-window .settings-body{
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  gap: 12px;
}

.modal-window.settings-modal-window .settings-nav{
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;

  width: 100%;
  flex: 0 0 auto;

  border-right: 0;
  border-bottom: 1px solid #e5e7eb;
  padding-right: 0;
  padding-bottom: 10px;

  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-window.settings-modal-window .settings-nav-btn{
  width: auto !important;
  min-width: 140px;
  flex: 0 0 auto;
  align-self: stretch;

  display: flex;
  align-items: center;
  justify-content: flex-start;

  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #f9fafb;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.modal-window.settings-modal-window .settings-nav-btn:hover{
  background: #eef2ff;
}

.modal-window.settings-modal-window .settings-nav-btn.is-active{
  background: #ffffff;
  border-color: #c7d2fe;
  box-shadow: 0 8px 18px rgba(79,70,229,0.10);
}

/* mobile: zakładki nad treścią */
@media (max-width: 1023px) {
  .modal-window.settings-modal-window{
    width: min(96vw, 520px) !important;
  }

  .modal-window.settings-modal-window .settings-body{
    flex-direction: column;
    gap: 10px;
  }

  .modal-window.settings-modal-window .settings-content{
    min-width: 0;
  }
}

/* desktop: zakładki po lewej */
@media (min-width: 1024px) {
  .modal-window.settings-modal-window{
    width: 90vw;
    max-width: 860px !important;
  }

  .modal-window.settings-modal-window .settings-body{
    flex-direction: row;
  }

  .modal-window.settings-modal-window .settings-nav{
    width: 190px;
    flex: 0 0 190px;

    flex-direction: column;
    align-items: stretch;

    border-bottom: 0;
    border-right: 1px solid #e5e7eb;

    padding-bottom: 0;
    padding-right: 10px;

    overflow-x: visible;
  }

  .modal-window.settings-modal-window .settings-nav-btn{
    width: 100% !important;
    min-width: 100%;
    flex: 0 0 auto;
    white-space: normal;
  }
}

.inbox-left {
  width: 320px;
  flex: 0 0 320px;

  display: flex;            /* ✅ flex-kolumna */
  flex-direction: column;
  min-height: 0;            /* ✅ klucz */
  overflow: hidden;         /* ✅ scroll ma być w .inbox-threads */

  border-right: 1px solid #e5e7eb;
  background: #f8fafc;
}

/* =========================
   MOBILE: ADMIN – Akcje zawsze widoczne (sticky prawa kolumna)
   ========================= */
@media (max-width: 640px) {

  /* prawa kolumna (Akcje) przyklejona */
  .admin-sticky-actions{
    position: sticky;
    right: 0;
    z-index: 20;
    background: #ffffff;
    box-shadow: -10px 0 14px rgba(0,0,0,0.10);
  }

  /* nagłówek ma być nad komórkami */
  thead .admin-sticky-actions{
    z-index: 30;
  }

}

/* =========================
   ADMIN USERS — JEDYNE przełączanie desktop/mobile (bez “dziury”)
   ========================= */

/* ✅ tabela users ma być tabelą (ale nie rozwalaj Alpine x-show) */
.admin-table-scroll > table.admin-users-table{
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
}

/* jeśli Alpine ukryje tabelę (x-show => inline display:none), to ma być ukryta */
.admin-table-scroll > table.admin-users-table[style*="display: none"]{
  display: none !important;
}

/* =========================
   ADMIN USERS – fix disappearing rows
   ========================= */

.admin-users-table tr.admin-users-row-desktop{
  display: table-row !important;
}

.admin-users-table tr.admin-users-row-mobile{
  display: none !important;
}

/* =========================
   PRYWATNY WPIS
   ========================= */

.private-product{
  border: 2px solid #3b82f6 !important; /* blue-500 */
  position: relative;
}

.private-product::after{
  content: "Wpis prywatny";
  position: absolute;
  top: 18px;
  left: -34px;

  transform: rotate(-20deg);

  background: #3b82f6;
  color: #fff;

  font-size: 11px;
  font-weight: 800;

  padding: 4px 10px;
  border-radius: 9999px;

  box-shadow: 0 6px 14px rgba(59,130,246,0.25);
}

.private-lock{
  font-size: 16px;
  line-height: 1;
}

/* =========================================================
   MAPA POWIATÓW — powiaty z wpisami na niebiesko
   ========================================================= */

#voivodeship-map-home .powiat.has-entries,
#voivodeship-map-home .powiat.has-entries path,
#voivodeship-map-home .powiat.has-entries polygon,
#voivodeship-map-home .powiat.has-entries rect{
  fill: #1d4ed8 !important;     /* niebieski */
  stroke: rgba(0,0,0,.25) !important;
}

#voivodeship-map-home .city-point.has-entries{
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(1.45);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.22));
}

#voivodeship-map-home .city-point.has-entries,
#voivodeship-map-home .city-point.has-entries circle,
#voivodeship-map-home .city-point.has-entries path{
  fill: #1d4ed8 !important;
  stroke: rgba(0,0,0,.35) !important;
}

/* =========================================================
   SMS VERIFY – prosty, czytelny flow (Ustawienia użytkownika)
   ========================================================= */

.sms-verify-box{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  background: #f8fafc;
}

.sms-verify-head{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.sms-verify-badge{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #b91c1c;
}

.sms-verify-help{
  font-size: 12px;
  color: #475569;
}

.sms-verify-step{
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================================
   MOBILE: Mapa wpisów jako ikonka + fullscreen modal
   ========================================================= */

body.no-scroll{
  overflow: hidden !important;
}

@media (max-width: 768px){

  /* overlay */
  .voiv-mobile-backdrop{
    position: fixed;
    inset: 0;
    z-index: 40000; /* ✅ zawsze nad sticky/paskami/modalami */
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
  }

  .voiv-mobile-close{
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 40002; /* ✅ zawsze nad mapą */

    width: 44px;
    height: 44px;
    border-radius: 9999px;

    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(148,163,184,0.65);
    box-shadow: 0 10px 24px rgba(0,0,0,0.20);

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    font-weight: 900;
    line-height: 1;
  }

  /* domyślnie: karta NIE ma się wyświetlać w layoucie na mobile */
  #voivodeship-battle-card{
    display: none !important;
  }

  /* po otwarciu: ta sama karta staje się fullscreen */
  html.voiv-mobile-open #voivodeship-battle-card{
    display: block !important;

    position: fixed !important;
    inset: 0 !important;
    z-index: 40001 !important; /* ✅ mapa nad overlay */




    width: 100vw !important;
    height: 100svh !important;
    max-width: 100vw !important;
    max-height: 100svh !important;

    margin: 0 !important;
    border-radius: 0 !important;

    background: #ffffff !important;
	
  /* ✅ KLUCZ: układ fullscreen */
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;	
	
    overflow-y: auto !important;
  }

  /* trochę miejsca pod close button */
  html.voiv-mobile-open #voivodeship-battle-card{
    padding-top: 56px !important;
  }

  /* mapa ma być duża w fullscreen */
  html.voiv-mobile-open #voivodeship-map-home svg{
    height: 62svh !important;
    min-height: 360px;
  }
}

.banner-title.voiv-title-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.voiv-header-map-btn{
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.55);
  background: rgba(255,255,255,0.90);
  box-shadow: 0 10px 24px rgba(15,23,42,0.12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* ✅ TYLKO MOBILE/TOUCH: ukryj na urządzeniach z myszką (desktop) */
.only-touch{
  display: inline-flex;
}

@media (hover: hover) and (pointer: fine){
  .only-touch{
    display: none !important;
  }
}

/* =========================
   ADMIN: responsywne tabele (bez suwaka) – mobile
   ========================= */

@media (max-width: 900px) {

  /* na mobile NIE przewijamy poziomo */
  .admin-table-scroll{
    overflow-x: hidden;
  }

  /* tabela ma się zmieścić i łamać */
  .admin-wrap-table{
    width: 100% !important;
    table-layout: fixed;          /* ściska kolumny */
  }

  .admin-wrap-table th,
  .admin-wrap-table td{
    white-space: normal !important;
    overflow-wrap: anywhere;      /* łamie długie rzeczy */
    word-break: break-word;
  }

  /* akcje mają się zawijać na 2 linie */
  .admin-wrap-table td .flex{
    flex-wrap: wrap;
  }
}