/*
 * Интеграция UPSKINS 25.11.2026: в селекторы добавлен родитель #cases (второй id). Общее правило home/upx-frames.css
 * (:is(... #reputationView #bpModal)::after) имеет специфичность двух id и иначе перекрывало border-image этой рамки
 * на frame-arena.png. Других изменений в файле пакета нет.
 *
 * UPSKINS catalog frames v17 — approved variant 1.
 * Mount ONLY on #allCases via class up-catalog-frames-v17.
 * #winterCases and all other sections are intentionally outside the scope.
 * Load AFTER the existing homepage / global frame styles.
 *
 * Existing cards have a transparent 1px border. The decorative image's
 * stroke centre sits 0.725px inside its own box.
 * inset-inline = -(card-border + 1.5 + 0.725) = -3.225px.
 * inset-block  = -(card-border + 4.0 + 0.725) = -5.725px.
 * The frame does not affect layout, art sizing, text, or event handlers.
 */

body.up-home-v12 main #cases #allCases.up-catalog-frames-v17 .case-card {
  position: relative;
  overflow: visible;
  border-radius: 0;
}

body.up-home-v12 main #cases #allCases.up-catalog-frames-v17 .case-card::after {
  /* Required: home-v12.css disables all case pseudo-elements with !important. */
  content: "" !important;
  display: block;
  position: absolute;
  inset: -1px;   /* 25.11.2026: внешний край линии = край карточки (была -5.725/-3.225 — рамка шире карточки) */
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;

  /* Replace the legacy decorative border, preserving a transparent centre. */
  border: 12px solid transparent;
  border-radius: 0;
  border-image-source: url("../assets/catalog-case-frame-v17.svg");
  border-image-slice: 12;
  border-image-width: 12px;
  border-image-outset: 0;
  border-image-repeat: stretch;

  background: none;
  box-shadow: none;
  filter: none;
  -webkit-mask: none;
  mask: none;
  opacity: 1;
  transform: none;
  transition: none;
  animation: none;
  z-index: 4;

  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/*
 * No global .case-card reset, no #winterCases rules, and no before/after
 * resets outside #allCases. Keep the existing v12 suppression elsewhere.
 * The SVG has no fill and needs no runtime JavaScript.
 */


/* 25.11.2026 (выравнивание рамок главной): рамка карточки теперь в её габаритах, поэтому видимые зазоры = зазоры сетки;
   вертикальный выровнен с горизонтальным (12px), чтобы сетка была регулярной в обе стороны. */
body.up-home-v12 main #cases #allCases.up-catalog-frames-v17 { row-gap: 12px; }
/* безопасный отступ от верхней линии рамки: картинка при наведении поднимается на 4px (home-v12.css) и не должна заходить на линию */
body.up-home-v12 main #cases #allCases.up-catalog-frames-v17 .case-card { padding-top: 6px; }
