/*
  Hidden Gem's layer over Postiz: the whole app a size smaller, so it reads like a website
  rather than a page zoomed in. Postiz sizes almost everything in pixels, so a smaller root font
  wouldn't shrink it; zoom scales text, spacing and panels together.

  Added to every page by the nginx inside the Postiz container (see install.sh), so it survives
  Postiz updates without rebuilding Postiz. Change --hgc-zoom to make it bigger or smaller.
*/
:root {
  --hgc-zoom: 0.85;
}

html {
  zoom: var(--hgc-zoom);
}

/* Full-height panels are measured in vh, which zoom shrinks too: stretch them back to the
   bottom of the window. */
.h-screen,
.h-\[100vh\] {
  height: calc(100vh / var(--hgc-zoom)) !important;
}
.min-h-screen {
  min-height: calc(100vh / var(--hgc-zoom)) !important;
}
.w-screen {
  width: calc(100vw / var(--hgc-zoom)) !important;
}

/* ─── A Facebook Story previewed as a Story (hgc.js adds .hgc-story) ───
   Facebook shows a Story as the picture alone: no caption, no likes. So: a phone-shaped
   9:16 frame, the picture filling it, the Page name over the top, and nothing else. */
.hgc-story {
  position: relative !important;
  width: 100% !important;
  max-width: 340px !important;
  aspect-ratio: 9 / 16;
  margin: 28px auto 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
  background: #000 !important;
  border-radius: 14px !important;
}
.hgc-story::before {
  /* What this is, above the frame. */
  content: "Facebook Story: only the picture shows, no text";
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #a3a3a3;
}
.hgc-story::after {
  /* The progress bar along the top of a Story. */
  content: "";
  position: absolute;
  z-index: 4;
  top: 8px;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #fff 55%, rgba(255, 255, 255, 0.35) 55%);
}
/* The caption, likes, comments and buttons: not on a Story. */
.hgc-story > div[dir="auto"],
.hgc-story > div:nth-child(n + 4) {
  display: none !important;
}
/* The Page name and picture, over the top of the Story. */
.hgc-story > div:first-child {
  position: absolute;
  z-index: 3;
  top: 20px;
  left: 12px;
  right: 12px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.hgc-story > div:first-child .text-\[12px\] {
  color: rgba(255, 255, 255, 0.75) !important;
}
/* The picture, filling the frame. */
.hgc-story > div:nth-child(3) {
  position: absolute !important;
  inset: 0;
  height: 100% !important;
  margin: 0 !important;
  border-radius: 14px;
  overflow: hidden;
}
.hgc-story > div:nth-child(3) img,
.hgc-story > div:nth-child(3) video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
