/* The share dialog (4f): one paper sheet for a dashboard, widget or folder,
   opened over the page or shown on its own in the window. */

.pitch-site--app .share-dialog {
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 12px;
  box-shadow: var(--ps-hard-shadow);
  color: var(--ps-ink);
  margin: 10vh auto auto;
  max-block-size: 80vh;
  max-inline-size: calc(100vw - 32px);
  overflow-y: auto;
  padding: 0;
  inline-size: 37.5rem;
}

.pitch-site--app .share-dialog::backdrop {
  background: rgba(12, 46, 25, 0.6);
}

.pitch-site--app .share-dialog__loading {
  color: var(--ps-ink-soft);
  font-size: 14px;
  margin: 0;
  padding: 20px;
}

.pitch-site--app .share-dialog__loading::before {
  background: var(--ps-yellow);
  block-size: 3px;
  content: "";
  display: block;
  margin: -20px -20px 17px;
}

.pitch-site--app .share-panel {
  display: block;
}

.pitch-site--app .share-panel__header {
  align-items: flex-start;
  border-block-end: 2px solid var(--ps-ink);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0;
  padding: 16px 0;
}

.pitch-site--app .share-panel__title {
  font-size: 19px;
  margin: 0;
}

.pitch-site--app .share-panel__lead,
.pitch-site--app .share-panel__note,
.pitch-site--app .share-access__detail {
  color: var(--ps-ink-soft);
  font-size: 13px;
  margin: 0;
}

.pitch-site--app .share-panel__close {
  align-items: center;
  border: 2px solid var(--ps-ink);
  border-radius: 6px;
  color: var(--ps-ink);
  display: inline-flex;
  flex: none;
  block-size: 30px;
  justify-content: center;
  text-decoration: none;
  inline-size: 30px;
}

.pitch-site--app .share-panel__close:hover {
  background: var(--ps-paper-shade);
}

.pitch-site--app .share-panel--page .share-panel__close {
  display: none;
}

.pitch-site--app .share-panel__body {
  padding: 16px 0;
}

.pitch-site--app .share-panel__add {
  align-items: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pitch-site--app .share-panel__grantee {
  flex: 1 1 14rem;
}

.pitch-site--app .share-panel__grantee .searchable-select__input,
.pitch-site--app .share-panel__role {
  background: var(--ps-paper-raised);
  border: 2px solid var(--ps-ink);
  border-radius: 8px;
  color: var(--ps-ink);
  font-size: 14px;
  min-block-size: 42px;
  padding-inline: 10px;
}

.pitch-site--app .share-panel__grantee .searchable-select__input {
  padding-inline-end: 2.25rem;
}

.pitch-site--app .share-panel__role {
  inline-size: auto;
}

.pitch-site--app .share-panel__add .btn {
  min-inline-size: 0;
}

.pitch-site--app .share-access .share-panel__role,
.pitch-site--app .share-everyone .share-panel__role {
  font-size: 13px;
  min-block-size: 32px;
}

.pitch-site--app .share-panel__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
  margin-block-end: 0;
  padding: 0;
}

.pitch-site--app .share-access,
.pitch-site--app .share-everyone {
  align-items: center;
  display: flex;
  gap: 12px;
}

.pitch-site--app .share-everyone {
  border: 1px solid rgba(14, 17, 17, 0.14);
  border-radius: 8px;
  padding: 12px;
}

.pitch-site--app .share-avatar {
  align-items: center;
  background: var(--ps-paper-shade);
  border-radius: 50%;
  color: var(--ps-ink);
  display: inline-flex;
  flex: none;
  font-size: 12px;
  font-weight: 700;
  block-size: 32px;
  justify-content: center;
  inline-size: 32px;
}

.pitch-site--app .share-avatar--owner,
.pitch-site--app .share-avatar--organisation {
  background: var(--ps-yellow);
}

.pitch-site--app .share-avatar--group {
  background: var(--ps-turf);
  border-radius: 6px;
  color: var(--ps-cream);
}

.pitch-site--app .share-access__who {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  line-height: 1.3;
  min-inline-size: 0;
}

.pitch-site--app .share-access__name {
  font-size: 14px;
  overflow-wrap: anywhere;
}

.pitch-site--app .share-access__role,
.pitch-site--app .share-access__remove-form,
.pitch-site--app .share-switch__form {
  margin: 0;
}

.pitch-site--app .share-access__owner {
  font-size: 13px;
  padding-inline: 10px;
}

.pitch-site--app .share-access__remove {
  background: none;
  border: 0;
  border-radius: 6px;
  color: var(--ps-ink-soft);
  cursor: pointer;
  font-size: 14px;
  padding: 6px 8px;
}

.pitch-site--app .share-access__remove:hover {
  background: var(--ps-paper-shade);
  color: var(--ps-red);
}

.pitch-site--app .share-switch {
  align-items: center;
  background: none;
  border: 0;
  color: var(--ps-ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
  padding: 4px;
}

.pitch-site--app .share-switch__track {
  background: var(--ps-cream-soft);
  border: 2px solid var(--ps-ink);
  border-radius: 100px;
  block-size: 22px;
  position: relative;
  inline-size: 38px;
}

.pitch-site--app .share-switch__track::after {
  background: var(--ps-ink);
  border-radius: 50%;
  content: "";
  block-size: 14px;
  inset-block-start: 2px;
  inset-inline-start: 2px;
  position: absolute;
  inline-size: 14px;
}

.pitch-site--app .share-switch[aria-checked="true"] .share-switch__track {
  background: var(--ps-turf);
}

.pitch-site--app .share-switch[aria-checked="true"] .share-switch__track::after {
  background: var(--ps-cream);
  inset-inline-start: 18px;
}

.pitch-site--app .share-panel__footer {
  align-items: center;
  background: none;
  border-block-start: 1px solid rgba(14, 17, 17, 0.14);
  color: var(--ps-ink-soft);
  display: flex;
  font-size: 13px;
  gap: 12px;
  justify-content: space-between;
  margin: 0;
  padding: 14px 0;
}

.pitch-site--app .share-panel__footer .btn {
  flex: none;
  min-inline-size: 0;
}

.pitch-site--app .share-dialog .share-panel__header,
.pitch-site--app .share-dialog .share-panel__body,
.pitch-site--app .share-dialog .share-panel__footer {
  padding-inline: 20px;
}

.pitch-site--app .share-dialog .share-panel__footer {
  background: var(--ps-paper);
}
