/* The share sheet of a family's page (_share_sheet.html).
 *
 * A `.sd-sheet`, so it is a bottom sheet on a phone and a modal on a desktop
 * (story_detail.css). This adds the Instagram story picture, the three
 * choices under it (Uložiť obrázok, Poslať niekomu, Instagram) and a quiet row
 * of chips (link, WhatsApp, Facebook). Mobile first: everything fits a 360 px
 * phone without scrolling, and the picture gives up height before a button
 * does.
 */
html .sd-ig__panel { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
html .sd-ig__bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
}
html .sd-ig__title {
  grid-column: 2;
  margin: 0;
  font-size: 19px;
  text-align: center;
  white-space: nowrap;
}
html .sd-ig__x {
  grid-column: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink, #16121f);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
html .sd-ig__x:hover { color: #b0306e; background: #fff; }

/* The picture at its own 9:16, as tall as the screen allows. */
html .sd-ig__frame {
  position: relative;
  display: grid;
  place-items: center;
  height: min(42dvh, 440px);
  aspect-ratio: 9 / 16;
  margin: 0 auto 14px;
  border: 4px solid #fff;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #ffd3ee, #e2d0ff 60%, #cfe4ff);
  box-shadow: 0 18px 44px rgba(180, 90, 150, 0.22);
}
html .sd-ig__frame[aria-busy="true"]::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: sd-ig-shine 1.3s linear infinite;
}
html .sd-ig__img { width: 100%; height: 100%; object-fit: cover; display: block; }
html .sd-ig__img[hidden] { display: none; }
html .sd-ig__wait {
  position: relative;
  z-index: 1;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-soft, #4a4557);
  text-align: center;
}
html .sd-ig__retry {
  position: relative;
  z-index: 1;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #16121f);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* Three glass tiles, the way a phone's own share sheet looks. */
html .sd-ig__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
html .sd-ig__actions > li { display: flex; }
html .sd-ig__tile {
  display: flex;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 96px;
  padding: 12px 6px 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.95);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.62));
  box-shadow: 0 10px 26px rgba(180, 90, 150, 0.12), inset 0 1px 0 #fff;
  color: var(--ink, #16121f);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
html .sd-ig__tile:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(180, 90, 150, 0.18), inset 0 1px 0 #fff; }
html .sd-ig__tile:disabled { opacity: 0.55; cursor: progress; transform: none; }
html .sd-ig__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #16121f;
}
html .sd-ig__icon--save { background: linear-gradient(140deg, #cfe4ff, #e2d0ff); }
html .sd-ig__icon--send { background: linear-gradient(140deg, #caf6df, #cfe4ff); }
html .sd-ig__icon--ig { background: linear-gradient(140deg, #ffd3ee, #ff8cd7 55%, #caa6ff); }
html .sd-ig__label { overflow-wrap: anywhere; }

html .sd-ig__more {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}
html .sd-ig__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1.5px rgba(22, 18, 31, 0.12);
  color: var(--ink, #16121f);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
html .sd-ig__chip:hover { background: #fff; }

@keyframes sd-ig-shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }

/* A short phone or an iPhone SE: the picture shrinks first. */
@media (max-height: 700px) {
  html .sd-ig__frame { height: min(34dvh, 300px); margin-bottom: 10px; }
  html .sd-ig__tile { min-height: 84px; padding-top: 8px; }
}
@media (max-width: 359px) {
  html .sd-ig__tile { font-size: 13px; }
  html .sd-ig__chip { padding: 0 11px; font-size: 13px; }
}
@media (min-width: 700px) {
  html .sd-ig { width: min(440px, calc(100vw - 32px)); }
}
@media (prefers-reduced-motion: reduce) {
  html .sd-ig__frame[aria-busy="true"]::after { animation: none; }
  html .sd-ig__tile { transition: none; }
}
