/* Sharing modal: centred in the top layer, independent of page layout. */
dialog.store-share-dialog[open] {
  position: fixed;
  inset: 0;
  margin: auto;
  display: block;
  box-sizing: border-box;
  width: min(520px, calc(100% - 32px));
  height: fit-content;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: var(--store-padding-highest, 25px);
  border: 1px solid color-mix(in srgb, var(--glam-color) 22%, transparent);
  border-radius: 10px;
  background: var(--glam-background-color);
  color: var(--glam-color);
  box-shadow: 0 12px 48px rgba(0,0,0,.28);
  font: 1rem/1.5 var(--glam-font-family);
  text-align: left;
  transform: none;
}
.store-share-dialog::backdrop { background: rgba(0,0,0,.55); }
.store-share-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.store-share-dialog h2 { margin: 0; font: 700 1.25rem/1.3 var(--glam-heading-font-family); color: inherit; }
.store-share-dialog [data-close-share] {
  display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.store-share-dialog [data-close-share] svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round;
}
.store-share-dialog [data-share-dialog-title] { margin: 0 0 20px; color: var(--glam-color-muted); overflow-wrap: anywhere; }
.store-share-network-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.store-share-dialog .store-share-network-grid a {
  display: flex; align-items: center; justify-content: center; text-align: center;
  box-sizing: border-box; min-height: 44px; min-width: 0; padding: 8px 5px;
  border: 1px solid color-mix(in srgb, var(--glam-color) 25%, transparent);
  border-radius: 8px; background: color-mix(in srgb, var(--glam-background-color) 94%, var(--glam-color));
  color: var(--glam-color); font: inherit; text-decoration: none; overflow-wrap: anywhere;
}
.store-share-dialog .store-share-network-grid a:hover,
.store-share-dialog [data-close-share]:hover {
  background: color-mix(in srgb, var(--glam-background-color) 85%, var(--glam-color));
  color: var(--glam-color); text-decoration: none;
}
.store-share-dialog label { display: block; margin-bottom: 5px; font: inherit; }
.store-share-dialog-actions { display: flex; align-items: stretch; gap: 8px; }
.store-share-dialog input {
  flex: 1 1 0; box-sizing: border-box; width: 100%; min-width: 0; min-height: 44px;
  margin: 0; padding: 10px; border: 1px solid color-mix(in srgb, var(--glam-color) 25%, transparent);
  border-radius: 8px; background: var(--glam-background-color); color: var(--glam-color);
  font: inherit;
}
.store-share-dialog-actions [data-copy-link] {
  flex: 0 0 auto; min-height: 44px; margin: 0; padding: 8px 15px; border-radius: 8px;
  border: 1px solid transparent; background: var(--store-dark-blue, #164e92); color: white;
  font: inherit; font-weight: 600; cursor: pointer;
}
.store-share-dialog-actions [data-copy-link]:hover { filter: brightness(1.15); }
.store-share-dialog :focus-visible { outline: 2px solid var(--glam-color); outline-offset: 3px; }
.store-share-dialog [data-share-status] { margin: 10px 0 0; }
.store-share-dialog [data-share-status]:empty { margin: 0; }
@media (max-width: 400px) {
  dialog.store-share-dialog[open] { padding: var(--store-padding-high, 15px); }
  .store-share-network-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .store-share-dialog-actions { flex-wrap: wrap; }
  .store-share-dialog input { flex-basis: 100%; }
  .store-share-dialog-actions [data-copy-link] { flex: 1; }
}
