/* ═══════════════════════════════════════════════════════════════
   Postiz UI overlay — sg.backus.agency
   Injected via nginx sub_filter; served from /pz/pz-mobile.css
   ═══════════════════════════════════════════════════════════════ */

/* ── video card poster + play badge (ALL viewports) ── */
.pz-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}
.pz-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  pointer-events: none;
  z-index: 2;
}
div[class*="cursor-pointer"] {
  position: relative;
}

/* modal video sizing on desktop too */
div[class*="p-[50px]"] video,
div[class*="p-[50px]"] img,
.mantine-Modal-content video,
.mantine-Modal-content img {
  max-width: 100% !important;
  max-height: 80vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

@media (max-width: 820px) {
  /* ── global guard: no horizontal page scroll ── */
  body {
    overflow-x: hidden;
  }

  /* ── app shell: root padding ── */
  div[class*="min-h-screen"] {
    padding: 6px !important;
  }

  /* ── left sidebar column: 80px → 52px ── */
  div[class*="bg-newBgColorInner"][class*="w-[80px]"] {
    width: 52px !important;
  }
  #left-menu {
    width: 44px !important;
    inset-inline-start: 8px !important;
  }

  /* ── header: compact, wrap-friendly ── */
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] {
    height: auto !important;
    min-height: 52px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    gap: 8px !important;
  }
  div[class*="text-[24px]"] {
    font-size: 16px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* hide non-essential header cluster (keep org selector + notifications) */
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(1),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(2),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(4),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(5),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(6),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(7),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(8),
  div[class*="bg-newBgColorInner"][class*="h-[80px]"] > div[class*="gap-[20px]"] > :nth-child(9) {
    display: none !important;
  }
  div[class*="gap-[20px]"] {
    gap: 8px !important;
  }

  /* ── media page: search + upload row wraps on small screens ── */
  div[class*="items-center"][class*="gap-[12px]"] {
    flex-wrap: wrap;
    gap: 8px !important;
  }
  div[class*="items-center"][class*="gap-[12px]"] input[type="text"] {
    min-width: 120px;
  }

  /* ── media grid cards: keep square, cap size ── */
  div[class*="w8-max"][class*="aspect-square"] {
    max-width: 24vw;
  }

  /* ── maximize / media modal: near-fullscreen ── */
  .mantine-Modal-content {
    max-width: 100vw !important;
    border-radius: 8px !important;
  }
  .mantine-Modal-inner {
    padding: 8px !important;
  }
  div[class*="p-[50px]"] {
    padding: 10px !important;
  }
  div[class*="p-[50px]"] video,
  div[class*="p-[50px]"] img {
    max-height: 62vh !important;
  }

  .pz-play {
    font-size: 26px;
  }

  /* ── uppy drag zone: full width, no overflow ── */
  div[class*="uppyChange"] {
    max-width: 100%;
  }
  .uppy-Dashboard-inner,
  .uppy-Dashboard {
    max-width: 100% !important;
  }

  /* ── pagination: touch friendly ── */
  ul li a,
  ul li span {
    font-size: 14px;
  }
}
