/*
 * Share Link Resolver page. Loads after the Last Table tokens and components and uses only their variables.
 * The one primary action is "Resolve the link"; the sample link fills the form and runs the same call.
 */

.lt-page .sl-faqs h2 {
  margin: 0;
  font: 560 var(--lt-step-3) / var(--lt-leading-tight) var(--lt-font-display);
  color: var(--lt-text-1);
}
.lt-page .lt-section:last-child { padding-bottom: var(--lt-space-8); }

.sl-facts { display: flex; flex-wrap: wrap; gap: var(--lt-space-2) var(--lt-space-5); margin: var(--lt-space-5) 0 0; font-size: var(--lt-step--1); color: var(--lt-text-2); }

/* The form and the answer sit side by side on a desktop and stack on a phone. */
.sl-try { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--lt-space-5); align-items: start; }
.sl-try .sl-result { margin-top: 0; max-width: none; min-width: 0; overflow-wrap: anywhere; scroll-margin-top: var(--lt-space-9); }
.sl-form { display: grid; gap: var(--lt-space-4); }
.sl-form h2 { margin: 0; }
.sl-field { display: grid; gap: var(--lt-space-2); min-width: 0; }
.sl-field .lt-prompt-hint { margin: 0; }
.sl-field .lt-input { width: 100%; min-width: 0; }
.sl-field textarea.lt-input { resize: vertical; }
.sl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--lt-space-3); }
.sl-form .lt-btn:disabled { opacity: 0.55; cursor: wait; }
#sl-status { margin: 0; }
#sl-status[data-tone="error"] { color: var(--lt-danger); }

/* The answer: one block per file, split by a line. */
#sl-files { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lt-space-4); margin-top: var(--lt-space-4); }
#sl-files:empty { display: none; }
.sl-file { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lt-space-2); padding-top: var(--lt-space-4); border-top: 1px solid var(--lt-line); min-width: 0; }
.sl-file-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--lt-space-2) var(--lt-space-4); }
.sl-file-name { margin: 0; font-size: var(--lt-step-0); font-weight: 600; overflow-wrap: anywhere; }
.sl-links { margin: 0; display: flex; flex-wrap: wrap; gap: var(--lt-space-4); }
.sl-handoff summary { cursor: pointer; color: var(--lt-text-2); font-size: var(--lt-step--1); min-height: 44px; display: flex; align-items: center; font-weight: 600; }
.sl-cmd { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--lt-space-2); margin-top: var(--lt-space-3); min-width: 0; }
/* A grid item is as wide as its longest line unless told otherwise; the command scrolls inside its box instead. */
.sl-cmd .lt-code { min-width: 0; }

.sl-note { margin-top: var(--lt-space-5); }
.sl-note p { margin: var(--lt-space-2) 0 0; }
.sl-steps { margin: var(--lt-space-4) 0 0; padding-left: var(--lt-space-5); display: grid; gap: var(--lt-space-2); }

@media (max-width: 760px) {
  .sl-try { grid-template-columns: minmax(0, 1fr); }
}
