/* ==========================================================================
   Glint web — shopping tags (Media.product_tags, features.shopping) and the live ring in
   the story tray. Kept in its own file so feature work doesn't collide in components.css.
   ========================================================================== */

/* Badge bottom-left (next to the user-tag toggle when both), pills at x/y. */
.media-products { position: absolute; inset: 0; pointer-events: none; }
.media-shop-badge {
  position: absolute; left: 12px; bottom: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(10, 12, 17, 0.72); color: #fff; pointer-events: auto;
}
.media.has-user-tags .media-shop-badge { left: 48px; }
.media.has-products { cursor: pointer; }
.media-product {
  position: absolute; transform: translate(-50%, 8px); display: grid; gap: 1px; max-width: 70%; padding: 6px 10px; border-radius: 6px;
  background: rgba(10, 12, 17, 0.84); color: #fff; text-align: left; pointer-events: auto; font-size: var(--type-meta-size); line-height: 1.25;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.media-product::before { content: ""; position: absolute; left: 50%; top: -5px; margin-left: -5px; border: 5px solid transparent; border-top: 0; border-bottom-color: rgba(10, 12, 17, 0.84); }
.media-product.is-above { transform: translate(-50%, calc(-100% - 8px)); }
.media-product.is-above::before { top: auto; bottom: -5px; border-bottom: 0; border-top: 5px solid rgba(10, 12, 17, 0.84); }
.media-product-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-product-price { color: rgba(255, 255, 255, 0.8); }
.media-product:hover { background: rgba(10, 12, 17, 0.95); }

/* Product sheet ($store.product). */
.product-sheet-body { display: grid; justify-items: center; gap: 6px; padding: 24px 24px 20px; text-align: center; }
.product-sheet-icon { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-raised); color: var(--text-primary); margin-bottom: 4px; }
.product-sheet-title { font-size: var(--type-title-md-size); font-weight: 600; overflow-wrap: anywhere; }
.product-sheet-price { font-size: var(--type-body-strong-size); font-weight: 600; }
.product-sheet-body .btn { width: 100%; margin-top: 6px; }
.product-sheet-cta { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin-top: 12px !important; }

/* Story tray: live items (red ring + LIVE pill under the avatar). */
.story-link.is-live { gap: 10px; }

/* Create flow: "Tag people" / "Tag products" mode rows and the product form. */
.cm-tagmodes { display: grid; }
.cm-tagmodes .cm-row { width: 100%; text-align: left; color: var(--text-primary); }
.cm-tagmodes .cm-row.is-on { background: var(--bg-raised); box-shadow: inset 3px 0 0 var(--brand-500); }
.cm-tag.cm-product { gap: 4px; }
.cm-productpop-fields { display: grid; gap: 8px; padding: 4px 12px 12px; }
.cm-productpop-fields .cm-tagpop-input { width: 100%; height: 36px; padding: 0 10px; border-radius: var(--radius-control, 8px); border: 1px solid var(--border-subtle); background: var(--bg-base); }
.cm-productpop-error { color: var(--status-danger); font-size: var(--type-meta-size); }
.cm-productpop .grow { flex: 1; }

/* Edit post dialog: product tags per photo. */
.ep-products { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ep-products-frame { position: relative; width: min(100%, 320px); border-radius: 8px; overflow: hidden; background: var(--media-placeholder); cursor: crosshair; }
.ep-products-frame img { display: block; width: 100%; height: auto; }
.ep-product-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.ep-product-row { display: flex; align-items: center; gap: 8px; font-size: var(--type-meta-size); }
.ep-product-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-product-media { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.ep-product-form { padding: 0; }
.ep-product-form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ep-products-frame .cm-tag { max-width: 70%; }
.ep-products-frame .cm-tag span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
