/* PoM plugin store (/plugins). Everything else comes from ../v1/styles.css. */
.plg-main { padding-block: clamp(36px, 6vw, 72px); }
.plg-title { max-width: 22ch; }
.plg-note { color: var(--ink-3); font-size: 15px; }
/* One plugin per row: a plugin is read, and three to a row squeezed the text and screenshots. */
.plg-grid { margin-top: 8px; grid-template-columns: minmax(0, 1fr); }

.plg-card { display: flex; flex-direction: column; gap: 12px; }
.plg-head { display: flex; align-items: center; gap: 14px; }
.plg-icon {
  width: 48px; height: 48px; border-radius: 14px; flex: 0 0 auto;
  /* white in both themes: plugin logos are drawn for a light ground, and a dark one hides on a dark card */
  object-fit: cover; background: #ffffff;
}
.plg-icon-fallback { background: linear-gradient(135deg, var(--blue), var(--teal)); }
.plg-name { margin: 0; }
.plg-desc { color: var(--ink-2); font-size: 14.5px; white-space: pre-line; }

/* The first screenshot is large enough to understand at a glance. The arrows
   turn this area into a carousel, and clicking it opens the full-screen viewer. */
.plg-shots {
  position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 190px; margin: 2px 0 0; border-radius: 14px; overflow: hidden;
  background: var(--card-solid); border: 1px solid var(--line);
}
.plg-shots img {
  grid-column: 1 / -1; grid-row: 1; width: 100%; height: 190px; object-fit: contain;
  cursor: zoom-in; background: var(--card-solid);
}
.plg-gallery-card-arrow { z-index: 1; grid-row: 1; width: 34px; height: 34px; padding: 0; border: 0;
  border-radius: 999px; background: rgba(24,21,27,.72); color: #fff; font-size: 25px; line-height: 1; }
.plg-gallery-card-arrow:first-of-type { grid-column: 1; justify-self: start; margin-left: 8px; }
.plg-gallery-card-arrow:last-of-type { grid-column: 3; justify-self: end; margin-right: 8px; }
.plg-gallery-card-count { z-index: 1; grid-column: 2; grid-row: 1; align-self: end; justify-self: center;
  margin: 0 0 8px; padding: 2px 8px; border-radius: 999px; background: rgba(24,21,27,.72); color: #fff; font-size: 12px; }
.plg-price { margin: auto 0 0; font-size: 15px; font-weight: 700; color: var(--ink); }

.plg-lightbox { width: min(96vw, 1280px); max-width: none; height: min(94vh, 900px); max-height: none;
  padding: 18px; border: 0; border-radius: 22px; background: var(--panel); color: #fff; }
.plg-lightbox::backdrop { background: rgba(8, 15, 24, .88); }
.plg-lightbox-inner { height: 100%; display: grid; grid-template-rows: auto 1fr auto; gap: 12px; }
.plg-lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.plg-lightbox-bar .btn-row { margin: 0; }
.plg-lightbox .btn-outline { color: #fff; border-color: rgba(255,255,255,.45); }
.plg-lightbox-stage { min-height: 0; display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 10px; }
#plg-lightbox-image { width: 100%; height: 100%; min-height: 0; object-fit: contain; cursor: zoom-in; }
.plg-gallery-arrow { width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.45); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #fff; font-size: 32px; line-height: 1; }
.plg-lightbox-count { margin: 0; text-align: center; color: rgba(255,255,255,.72); font-size: 13px; }
@media (max-width: 640px) {
  .plg-shots, .plg-shots img { min-height: 150px; height: 150px; }
  .plg-lightbox { width: 100vw; height: 100vh; border-radius: 0; padding: 12px; }
  .plg-lightbox-bar { align-items: flex-start; }
  .plg-lightbox-stage { grid-template-columns: 36px 1fr 36px; gap: 4px; }
}
/* Wide screens: the details on the left, the screenshots large on the right. */
@media (min-width: 820px) {
  .plg-card:has(.plg-shots:not([hidden])) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); column-gap: clamp(22px, 3vw, 40px);
    grid-template-rows: auto auto 1fr auto; align-items: start;
  }
  .plg-card:has(.plg-shots:not([hidden])) > .plg-shots { grid-column: 2; grid-row: 1 / 5; margin: 0; }
  .plg-card:has(.plg-shots:not([hidden])) .plg-shots img { height: 260px; }
  .plg-card:has(.plg-shots:not([hidden])) .plg-shots { min-height: 260px; }
  .plg-card:has(.plg-shots:not([hidden])) > .plg-price { align-self: end; }
  .plg-desc { max-width: 68ch; }
}
.plg-price .plg-note { font-size: 13px; font-weight: 400; display: block; margin-top: 2px; }
/* A promotion: the full price struck through, Paddle's discounted total after it, and the offer's terms. */
.plg-term { white-space: nowrap; }
.plg-was { color: var(--ink-3); font-weight: 500; text-decoration-thickness: 1.5px; }
.plg-now { color: var(--teal); }
.plg-price .plg-note-promo { color: var(--teal); font-weight: 600; }
.plg-cta { margin: 0; }
.plg-footnote { margin-top: 44px; }

/* Search and publish link above the grid; badges for featured, PoM team and community plugins. */
.plg-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 24px 0; }
.plg-search { flex: 1 1 260px; max-width: 420px; }
.plg-search input { width: 100%; }
.plg-tool-links { margin: 0; gap: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plg-title-wrap { min-width: 0; }
.plg-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; }
.plg-badge-team { text-transform: none !important; }
.plg-badge { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid currentColor; }
.plg-badge-featured { color: var(--teal); }
.plg-badge-soon { color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, transparent); }
.plg-badge-promo { color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.plg-card-soon .plg-price { color: var(--ink-3); font-weight: 600; }
.plg-badge-team { color: var(--blue); }
.plg-badge-community { color: var(--ink); opacity: .7; }
.plg-card-featured { box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 55%, transparent); }
.plg-icon[hidden], .plg-shots[hidden] { display: none; }
