/* The Share panel (web/share.js): ORA's glass dialog, lavender accents, the same tokens as the new client flow. */

body.sh-open { overflow: hidden; }

.sh-overlay {
  position: fixed;
  inset: 0;
  z-index: 210;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: rgba(27, 18, 44, .42);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
}

.sh-dialog {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .66);
  border-radius: 22px;
  background:
    radial-gradient(circle at 8% -6%, rgba(167, 139, 250, .22), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(246, 242, 255, .93));
  box-shadow: 0 32px 100px -38px rgba(27, 16, 66, .72), inset 0 1px 0 rgba(255, 255, 255, .9);
  color: var(--ink);
  font-family: var(--sans);
}
.sh-dialog *, .sh-dialog *::before, .sh-dialog *::after { box-sizing: border-box; }

.sh-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 12px;
}
.sh-head h2 { margin: 0; font-family: var(--serif); font-size: 28px; line-height: 1.15; text-wrap: balance; }
.sh-head p { margin: 4px 0 0; color: var(--mute); font-size: 15px; }

.sh-body { overflow-y: auto; padding: 4px 24px 24px; display: grid; gap: 12px; align-content: start; }
.sh-body h3 { margin: 12px 0 0; font-size: 13px; font-weight: 600; letter-spacing: .03em; color: var(--mute); }
.sh-loading, .sh-readonly { margin: 0; color: var(--mute); font-size: 15px; }
.sh-saving { margin-left: 8px; font-weight: 500; letter-spacing: 0; color: var(--lav-600); }

.sh-add { display: grid; gap: 8px; }
.sh-add label { font-weight: 600; font-size: 15px; }
.sh-person-rows { display: grid; gap: 8px; }
.sh-person-row { display: flex; align-items: center; gap: 6px; }
.sh-add-person { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.sh-access { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.sh-access label { font-size: 15px; font-weight: 600; }
.sh-add input, .sh-add select, .sh-add textarea, .sh-role-select {
  font: inherit;
  color: var(--ink);
  border: 1px solid rgba(124, 92, 255, .28);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
}
.sh-add input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; font-size: 15px; }
.sh-add select { height: 48px; padding: 0 10px; font-size: 15px; }
.sh-add textarea { width: 100%; padding: 10px 14px; font-size: 15px; resize: vertical; }
.sh-add input:focus, .sh-add select:focus, .sh-add textarea:focus, .sh-role-select:focus {
  outline: 2px solid var(--lav-400);
  outline-offset: 1px;
}
.sh-help { margin: 0; color: var(--mute); font-size: 13px; }

.sh-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sh-primary {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: var(--brand-grad);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.sh-primary:disabled { opacity: .6; cursor: progress; }

.sh-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(220, 38, 38, .08); color: #9f1d1d; font-size: 14px; }

.sh-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sh-results li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}
.sh-results .is-ok { background: rgba(22, 163, 74, .09); color: #14532d; }
.sh-results .is-warn { background: rgba(217, 119, 6, .1); color: #7c2d12; }
.sh-results .is-off { background: rgba(100, 100, 120, .08); color: var(--ink-2); }

.sh-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sh-person {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-radius: 12px;
}
.sh-person:hover { background: rgba(124, 92, 255, .05); }
.sh-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--lav-100);
  color: var(--lav-600);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sh-who { display: grid; min-width: 0; }
.sh-who strong { font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.sh-who em { font-style: normal; font-weight: 400; color: var(--mute); }
.sh-who small { color: var(--mute); font-size: 13px; overflow-wrap: anywhere; }
.sh-control { display: flex; align-items: center; gap: 4px; }
.sh-role-select { height: 36px; padding: 0 8px; font-size: 14px; }
.sh-role-fixed { color: var(--mute); font-size: 14px; padding: 0 8px; }
.sh-confirm { display: flex; align-items: center; gap: 6px; font-size: 14px; }

.sh-icon, .sh-link, .sh-danger {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 10px;
}
.sh-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--mute); }
.sh-icon:hover { background: rgba(124, 92, 255, .1); color: var(--ink); }
.sh-close { width: 44px; height: 44px; font-size: 18px; }
.sh-link { padding: 6px 8px; color: var(--lav-600); font-weight: 600; font-size: 14px; white-space: nowrap; }
.sh-link:hover { background: rgba(124, 92, 255, .08); }
.sh-danger { padding: 6px 10px; background: #b42318; color: #fff; font-weight: 600; font-size: 14px; }

.sh-notice .sh-body p { margin: 0; font-size: 15px; line-height: 1.5; }

/* Who can create clients (web/client-creators.js) borrows these parts, plus the few below. */
.sh-note { margin: 0; color: var(--mute); font-size: 13px; line-height: 1.45; }
.sh-count { font-weight: 500; color: var(--mute-2); }
.sh-confirm small { margin-right: 2px; color: var(--mute); font-size: 12.5px; }
.sh-person.is-new { background: rgba(22, 163, 74, .07); }
.sh-global summary { display: flex; align-items: center; gap: 6px; margin: 12px 0 0; color: var(--mute); font-size: 13px; font-weight: 600; letter-spacing: .03em; list-style: none; cursor: pointer; }
.sh-global summary::-webkit-details-marker { display: none; }
.sh-global summary i { transition: transform .2s ease; }
.sh-global[open] summary i { transform: rotate(90deg); }
.sh-global .sh-note { margin: 6px 0 4px; }

@media (max-width: 520px) {
  .sh-person { grid-template-columns: 32px minmax(0, 1fr); }
  .sh-control { grid-column: 2; }
}
