/*
  Modal 08 — Share Dialog — standalone HTML/CSS/JS.
  No build step, no framework, no external dependency: copy index.html,
  this file, and script.js into any project as-is.
*/

:root {
  --share-fg: oklch(0.18 0 0);
  --share-muted: oklch(0.5 0 0);
  --share-line: oklch(0.92 0 0);
  --share-soft: oklch(0.975 0 0);
  --share-danger: oklch(0.55 0.2 27);
  --share-accent: #39ff14;
}

.modal08 {
  position: fixed;
  inset: 0;
  z-index: 50;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji";
}

.modal08[hidden] {
  display: none;
}

.modal08 p,
.modal08 h2,
.modal08 h3,
.modal08 ul,
.modal08 form {
  margin: 0;
}

.modal08 ul {
  list-style: none;
}

.modal08 svg {
  display: block;
}

.modal08 *,
.modal08 *::before,
.modal08 *::after {
  box-sizing: border-box;
}

/* A cool, softly blurred wash: the document stays recognisable behind the
   people you are sharing it with. */
.modal08__backdrop {
  position: fixed;
  inset: 0;
  background-color: oklch(0.32 0.02 250 / 0.3);
  backdrop-filter: blur(8px);
  animation: modal08-fade-in 200ms ease-out both;
}

.modal08[data-state="closing"] .modal08__backdrop {
  animation: modal08-fade-out 150ms ease-in both;
}

.modal08__positioner {
  position: relative;
  display: flex;
  min-height: 100%;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Lifts a short way up into place. */
.modal08__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  overflow: hidden;
  border: 1px solid var(--share-line);
  border-radius: 1rem;
  background-color: #ffffff;
  box-shadow: 0 24px 64px -24px rgba(15, 23, 42, 0.35);
  animation: modal08-lift 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.modal08[data-state="closing"] .modal08__panel {
  animation: modal08-drop 150ms ease-in both;
}

.modal08__header {
  padding: 1.25rem 3.5rem 0 1.25rem;
}

.modal08__title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--share-fg);
}

.modal08__description {
  margin-top: 0.25rem !important;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: var(--share-muted);
}

.modal08__close,
.modal08__invite,
.modal08__copy,
.modal08__select {
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition:
    background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
    color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal08__close {
  position: absolute;
  top: 0.875rem;
  right: 0.875rem;
  display: flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.5rem;
  padding: 0;
  background: transparent;
  color: var(--share-muted);
}

.modal08__close:hover {
  background-color: var(--share-soft);
  color: var(--share-fg);
}

.modal08__close svg {
  width: 1rem;
  height: 1rem;
}

.modal08__form {
  padding: 1rem 1.25rem 0;
}

.modal08__row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal08__field {
  display: flex;
  height: 2.5rem;
  min-width: 0;
  flex: 1;
  align-items: center;
  border: 1px solid var(--share-line);
  border-radius: 0.5rem;
  background-color: #ffffff;
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.modal08__field:has(input:focus-visible) {
  outline: 2px solid var(--share-fg);
  outline-offset: 2px;
}

.modal08__field[data-invalid] {
  border-color: var(--share-danger);
}

.modal08__email {
  height: 100%;
  min-width: 0;
  flex: 1;
  border: 0;
  padding: 0 0 0 0.75rem;
  background: transparent;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--share-fg);
  outline: none;
}

.modal08__email::placeholder {
  color: var(--share-muted);
}

.modal08__picker {
  position: relative;
  flex-shrink: 0;
}

.modal08__field .modal08__picker {
  margin-right: 0.25rem;
}

.modal08__select {
  height: 2rem;
  appearance: none;
  border: 0;
  border-radius: 0.375rem;
  padding: 0 1.75rem 0 0.5rem;
  background: transparent;
  font-size: 13px;
  color: var(--share-fg);
}

.modal08__select:hover {
  background-color: var(--share-soft);
}

.modal08__select--strong {
  font-weight: 500;
}

.modal08__chevron {
  pointer-events: none;
  position: absolute;
  top: 50%;
  right: 0.5rem;
  width: 0.875rem;
  height: 0.875rem;
  color: var(--share-muted);
  transform: translateY(-50%);
}

.modal08__invite {
  height: 2.5rem;
  flex-shrink: 0;
  border: 0;
  border-radius: 0.5rem;
  padding: 0 1rem;
  background-color: var(--share-fg);
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

.modal08__invite:hover {
  background-color: oklch(0.3 0 0);
}

.modal08__error {
  margin-top: 0.5rem !important;
  font-size: 13px;
  line-height: 1.25rem;
  color: var(--share-danger);
}

.modal08__error[hidden] {
  display: none;
}

.modal08__people {
  padding: 1.25rem 1.25rem 0;
}

.modal08__label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  color: var(--share-muted);
}

.modal08__label span {
  font-variant-numeric: tabular-nums;
}

.modal08__list {
  max-height: 13rem;
  margin: 0.375rem -0.5rem 0 !important;
  overflow-y: auto;
  padding: 0 0.5rem 0.5rem;
}

.modal08__member {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.375rem 0;
  animation: modal08-member-in 260ms ease-out both;
}

.modal08__avatar {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: oklch(0.94 0 0);
  font-size: 11px;
  font-weight: 600;
  color: var(--share-fg);
}

.modal08__avatar[data-kind="you"] {
  background-color: var(--share-fg);
  color: #ffffff;
}

.modal08__avatar[data-kind="pending"] {
  border: 1px dashed oklch(0.8 0 0);
  background-color: transparent;
  color: var(--share-muted);
}

.modal08__person {
  min-width: 0;
  flex: 1;
}

.modal08__name,
.modal08__detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal08__name {
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: var(--share-fg);
}

.modal08__name span {
  font-weight: 400;
  color: var(--share-muted);
}

.modal08__detail {
  font-size: 0.75rem;
  line-height: 1rem;
  color: var(--share-muted);
}

.modal08__owner {
  flex-shrink: 0;
  padding-right: 0.5rem;
  font-size: 13px;
  color: var(--share-muted);
}

.modal08__access {
  border-top: 1px solid var(--share-line);
  background-color: var(--share-soft);
  padding: 1rem 1.25rem;
}

.modal08__general {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.modal08__icon {
  display: flex;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--share-line);
  border-radius: 9999px;
  background-color: #ffffff;
  color: var(--share-fg);
}

.modal08__icon svg {
  width: 1rem;
  height: 1rem;
}

.modal08__icon svg[hidden] {
  display: none;
}

.modal08__general-text {
  min-width: 0;
  flex: 1;
}

.modal08__general .modal08__picker {
  display: inline-block;
  margin-left: -0.5rem;
}

.modal08__link-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.modal08__link {
  height: 2.25rem;
  min-width: 0;
  flex: 1;
  border: 1px solid var(--share-line);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  color: var(--share-muted);
  outline: none;
}

.modal08__copy {
  display: flex;
  height: 2.25rem;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--share-line);
  border-radius: 0.5rem;
  padding: 0 0.75rem;
  background-color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  color: var(--share-fg);
}

.modal08__copy:hover {
  background-color: oklch(0.96 0 0);
}

.modal08__copy svg {
  width: 1rem;
  height: 1rem;
}

.modal08__copied {
  display: flex;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--share-accent);
  color: var(--share-fg);
}

.modal08__copied svg {
  width: 0.625rem;
  height: 0.625rem;
}

.modal08__copy [hidden] {
  display: none;
}

.modal08__close:focus-visible,
.modal08__invite:focus-visible,
.modal08__copy:focus-visible,
.modal08__select:focus-visible,
.modal08__link:focus-visible {
  outline: 2px solid var(--share-fg);
  outline-offset: 2px;
}

.modal08__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  padding: 0;
}

@keyframes modal08-fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal08-fade-out {
  to {
    opacity: 0;
  }
}

@keyframes modal08-lift {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes modal08-drop {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes modal08-member-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 40rem) {
  .modal08__header {
    padding: 1.5rem 3.5rem 0 1.5rem;
  }
  .modal08__close {
    top: 1.125rem;
    right: 1.125rem;
  }
  .modal08__form {
    padding: 1rem 1.5rem 0;
  }
  .modal08__row {
    flex-direction: row;
  }
  .modal08__people {
    padding: 1.25rem 1.5rem 0;
  }
  .modal08__access {
    padding: 1rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal08__panel {
    animation-name: modal08-fade-in;
    animation-duration: 120ms;
  }
  .modal08[data-state="closing"] .modal08__panel {
    animation-name: modal08-fade-out;
  }
  .modal08__member {
    animation: none;
  }
}

/*
  Page layout — the canvas this resource is presented on. Adjust or drop it
  when placing the resource inside your own layout.
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  line-height: 1.5;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(to bottom, #fafafa, #f4f4f5);
}
p {
  margin: 0;
}
.modal08-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
}
.modal08-layout__app {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 60rem;
  height: 38rem;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 18px 44px -20px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
}
.modal08-layout__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-bottom: 1px solid oklch(0.97 0 0);
  padding: 0.875rem 1.5rem;
}
.modal08-layout__doc {
  min-width: 0;
}
.modal08-layout__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: oklch(0.205 0 0);
}
.modal08-layout__meta {
  font-size: 0.75rem;
  line-height: 1rem;
  color: oklch(0.556 0 0);
}
.modal08-layout__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.modal08-layout__faces {
  display: none;
}
.modal08-layout__faces span {
  display: flex;
  width: 1.75rem;
  height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 2px solid #ffffff;
  border-radius: 9999px;
  background: oklch(0.97 0 0);
  font-size: 10px;
  font-weight: 600;
  color: oklch(0.371 0 0);
}
.modal08-layout__faces span + span {
  margin-left: -0.375rem;
}
.modal08-layout__share {
  display: flex;
  height: 2.25rem;
  align-items: center;
  border: 0;
  border-radius: 0.5rem;
  background: oklch(0.205 0 0);
  padding: 0 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  outline: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.modal08-layout__share:hover {
  background: oklch(0.371 0 0);
}
.modal08-layout__share:focus-visible {
  outline: 2px solid oklch(0.205 0 0);
  outline-offset: 2px;
}
.modal08-layout__page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.modal08-layout__line {
  height: 0.75rem;
  margin-top: 0.75rem;
  border-radius: 0.25rem;
  background: oklch(0.97 0 0);
}
.modal08-layout__line--title {
  width: 66.666%;
  height: 1.25rem;
  margin-top: 0;
  background: oklch(0.922 0 0);
}
.modal08-layout__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.modal08-layout__tiles span {
  aspect-ratio: 4 / 3;
  border-radius: 0.5rem;
  background: oklch(0.97 0 0);
}
@media (min-width: 40rem) {
  .modal08-layout__app {
    height: 34rem;
  }
  .modal08-layout__faces {
    display: flex;
  }
}
