/* Share window for the "Share This Article" button (js/share.js).
   Computers, and phones whose browser has no share sheet of its own. */
.share-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 24px 24px 26px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #111111;
  font-family: var(--font-ui);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
}
.share-dialog::backdrop { background: rgba(10, 14, 20, .55); }
.share-dialog[open] { animation: share-in .16s ease-out; }
@keyframes share-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.share-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-dialog-title { margin: 0; font: 600 20px/1.3 var(--font-ui); }
.share-dialog-close { display: grid; place-items: center; width: 36px; height: 36px; margin: -6px -8px 0 0; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #555555; cursor: pointer; }
.share-dialog-close svg { width: 22px; height: 22px; }
.share-dialog-close:hover { background: #f0f0f0; color: #111111; }
.share-dialog-page { margin: 4px 0 20px; font-size: 15px; line-height: 1.4; color: #6b6b6b; }

.share-dialog-list { display: flex; flex-wrap: wrap; gap: 6px 4px; justify-content: space-between; margin: 0 0 22px; padding: 0; list-style: none; }
.share-dialog-list li { flex: 1 1 0; min-width: 64px; }
.share-dialog-option { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding: 6px 0; border: 0; border-radius: 12px; background: none; color: #333333; font: 500 13px/1.2 var(--font-ui); text-decoration: none; cursor: pointer; }
.share-dialog-option:hover { background: #f4f4f4; }
.share-dialog-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #ffffff; }
.share-dialog-icon svg { width: 26px; height: 26px; }
.share-facebook .share-dialog-icon { background: #ffffff; color: #0866ff; }
.share-facebook .share-dialog-icon svg { width: 52px; height: 52px; }   /* the logo is itself a circle */
.share-whatsapp .share-dialog-icon { background: #25d366; }
.share-email .share-dialog-icon { background: #6b7280; }
.share-x .share-dialog-icon { background: #000000; }
.share-x .share-dialog-icon svg { width: 22px; height: 22px; }
.share-telegram .share-dialog-icon { background: #ffffff; color: #26a5e4; }
.share-telegram .share-dialog-icon svg { width: 52px; height: 52px; }
.share-more .share-dialog-icon { background: #e8e8e8; color: #333333; }

.share-dialog-link { display: flex; gap: 8px; padding: 6px 6px 6px 14px; border: 1.5px solid #d6d6d6; border-radius: 999px; background: #fafafa; }
.share-dialog-link input { flex: 1; min-width: 0; border: 0; background: none; color: #333333; font: 15px/1.4 var(--font-ui); text-overflow: ellipsis; outline: none; }
.share-dialog-copy { flex: none; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--color-accent); color: #ffffff; font: 600 15px/1.2 var(--font-ui); cursor: pointer; }
.share-dialog-copy:hover { background: color-mix(in srgb, var(--color-accent) 78%, #000000); }
.share-dialog-copy.is-copied { background: #1f8a4c; }

.share-dialog :focus-visible { outline: 3px solid var(--color-highlight); outline-offset: 2px; }

/* Phone without a share sheet: the window slides up from the bottom. */
@media (max-width: 560px) {
  .share-dialog { width: 100%; max-width: 100%; box-sizing: border-box; margin: auto 0 0; padding-bottom: calc(26px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
  .share-dialog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 4px; }
}
