.ls-share-target-row {
  position: relative;
}

.ls-share-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-left: auto;
  padding-left: 0.5rem;
}

.ls-share-action {
  min-height: 1.75rem;
  border: 1px solid rgba(30, 43, 68, 0.16);
  border-radius: 6px;
  background: #fbfdff;
  color: #101827;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 160ms cubic-bezier(0.22, 1, 0.36, 1),
    background 160ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 160ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ls-share-action:hover,
.ls-share-action:focus-visible {
  border-color: rgba(15, 163, 177, 0.5);
  background: rgba(15, 163, 177, 0.08);
  transform: translateY(-1px);
}

.ls-share-action-secondary {
  color: #526078;
}

.ls-share-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(16, 24, 39, 0.42);
  padding: 1rem;
}

.ls-share-modal-panel {
  width: min(100%, 42rem);
  max-height: min(86vh, 46rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(30, 43, 68, 0.14);
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 24px 70px rgba(30, 43, 68, 0.18);
}

.ls-share-runner-modal .ls-share-modal-panel,
.ls-share-editor-modal .ls-share-modal-panel {
  width: min(100%, 54rem);
}

.ls-share-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(30, 43, 68, 0.08);
  padding: 1.1rem 1.25rem;
}

.ls-share-modal-header h2 {
  margin: 0;
  color: #101827;
  font-size: 1.15rem;
  font-weight: 680;
  line-height: 1.25;
  letter-spacing: 0;
}

.ls-share-modal-close,
.ls-share-mini-button {
  border: 1px solid rgba(30, 43, 68, 0.14);
  border-radius: 6px;
  background: #fbfdff;
  color: #526078;
  padding: 0.42rem 0.55rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
}

.ls-share-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 1.25rem;
}

.ls-share-modal-stack,
.ls-share-editor,
.ls-shared-runner {
  display: grid;
  gap: 1rem;
}

.ls-share-note {
  margin: 0;
  color: #526078;
  font-size: 0.9rem;
  line-height: 1.6;
}

.ls-share-code-box {
  border: 1px solid rgba(15, 163, 177, 0.34);
  border-radius: 8px;
  background: rgba(15, 163, 177, 0.08);
  color: #101827;
  padding: 1rem;
  font-size: 1.35rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  text-align: center;
}

.ls-share-link-box {
  margin: 0;
  overflow-wrap: anywhere;
  border: 1px solid rgba(30, 43, 68, 0.1);
  border-radius: 6px;
  background: #f7fafc;
  color: #526078;
  padding: 0.75rem;
  font-size: 0.84rem;
  line-height: 1.5;
}

.ls-share-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.ls-share-primary,
.ls-share-secondary {
  min-height: 2.45rem;
  border-radius: 6px;
  padding: 0.72rem 0.95rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 680;
  line-height: 1;
  cursor: pointer;
}

.ls-share-primary {
  border: 1px solid #101827;
  background: #101827;
  color: #fbfdff;
}

.ls-share-secondary {
  border: 1px solid rgba(30, 43, 68, 0.14);
  background: #fbfdff;
  color: #101827;
}

.ls-share-primary:disabled,
.ls-share-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.ls-share-field,
.ls-shared-question {
  display: grid;
  gap: 0.45rem;
}

.ls-share-field span,
.ls-shared-question-title {
  color: #101827;
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.45;
}

.ls-share-input,
.ls-shared-answer {
  width: 100%;
  border: 1px solid rgba(30, 43, 68, 0.14);
  border-radius: 6px;
  background: #fbfdff;
  color: #101827;
  padding: 0.72rem 0.8rem;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
}

.ls-share-input:focus,
.ls-shared-answer:focus {
  border-color: rgba(15, 163, 177, 0.65);
  outline: 2px solid rgba(15, 163, 177, 0.15);
  outline-offset: 1px;
}

.ls-share-editor-list,
.ls-shared-question-list {
  display: grid;
  gap: 0.85rem;
}

.ls-share-editor-question {
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(30, 43, 68, 0.1);
  border-radius: 8px;
  background: #f7fafc;
  padding: 0.9rem;
}

.ls-share-editor-question-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ls-share-hidden-copy {
  position: fixed;
  left: -9999px;
  top: -9999px;
}

@media (max-width: 640px) {
  .ls-share-controls {
    width: 100%;
    justify-content: flex-end;
    padding-left: 0;
    padding-top: 0.45rem;
  }

  .ls-share-modal-panel {
    max-height: 90vh;
  }

  .ls-share-modal-header,
  .ls-share-modal-body {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ls-share-action {
    transition-duration: 0.001ms;
  }
}
