/* Reusable Share modal (assets/share-modal.js), used from My Decks and the
   Deck Workspace header. Reuses the site's existing .dc-confirm-dialog
   native <dialog> shell (see my-decks-page.js) for backdrop/focus handling;
   only the inner content is share-modal specific. */

.share-modal { width: min(560px, calc(100vw - 32px)); }
.share-modal-body { padding: 24px; display: flex; flex-direction: column; gap: 20px; }

.share-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.share-modal-head h2 { margin: 0; font-size: 19px; font-weight: 700; }
.share-modal-close { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; border: none; background: none; color: var(--muted, #9a978f); cursor: pointer; }
.share-modal-close:hover { background: rgba(255,255,255,0.06); color: var(--text, #e8e8ea); }

.share-modal-label { margin: 0 0 8px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted, #9a978f); }

.share-modal-current { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--border, rgba(255,255,255,0.08)); border-radius: 12px; background: rgba(255,255,255,0.02); }
.share-modal-current-icon { flex: none; display: flex; color: var(--accent, #c9a84c); margin-top: 1px; }
.share-modal-current strong { display: block; font-size: 14px; color: var(--text, #e8e8ea); }
.share-modal-current span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted, #9a978f); line-height: 1.4; }

.share-modal-options { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.share-modal-option-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--border-strong, rgba(255,255,255,0.12));
  background: none; color: var(--text, #e8e8ea); font-size: 13px; font-weight: 650; cursor: pointer;
}
.share-modal-option-btn:hover { border-color: var(--accent, #c9a84c); }
.share-modal-option-btn--primary { background: var(--accent, #c9a84c); border-color: var(--accent, #c9a84c); color: #14140f; }
.share-modal-option-btn--primary:hover { background: var(--accent-soft, #efd58b); }
.share-modal-option-btn--danger { color: #ff8a8a; border-color: rgba(255,138,138,0.3); }

.share-modal-link-section { padding-top: 16px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); }
.share-modal-link-row { display: flex; gap: 8px; }
.share-modal-link-input {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border-strong, rgba(255,255,255,0.12)); background: rgba(255,255,255,0.03);
  color: var(--text, #e8e8ea); font-size: 13px;
}
.share-modal-copy-btn {
  flex: none; height: 40px; padding: 0 16px; border-radius: 9px; border: 1px solid var(--accent, #c9a84c);
  background: var(--accent, #c9a84c); color: #14140f; font-size: 13px; font-weight: 700; cursor: pointer;
}
.share-modal-copy-btn:hover { background: var(--accent-soft, #efd58b); }
.share-modal-open-link { display: inline-block; margin-top: 10px; font-size: 12.5px; color: var(--muted, #9a978f); text-decoration: none; }
.share-modal-open-link:hover { color: var(--accent, #c9a84c); }

.share-modal-attribution { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); font-size: 12.5px; color: var(--muted, #9a978f); line-height: 1.4; cursor: pointer; }
.share-modal-attribution input { flex: none; margin-top: 2px; width: 16px; height: 16px; }
.share-modal-attribution input:disabled { opacity: .5; }

.share-modal-more { padding-top: 16px; border-top: 1px solid var(--border, rgba(255,255,255,0.06)); display: flex; flex-direction: column; gap: 10px; }
.share-modal-more-hint { margin: 0; font-size: 12.5px; color: var(--muted, #9a978f); line-height: 1.4; }
.share-modal-error { margin: 0; font-size: 12px; color: #ff8a8a; }

.share-modal-note { margin: 0; font-size: 12px; color: var(--muted, #9a978f); line-height: 1.5; }

@media (max-width: 480px) {
  .share-modal-link-row { flex-direction: column; }
  .share-modal-options { flex-direction: column; align-items: stretch; }
}
