/* Bottom sheets: invite, the row menu and the confirmations (M2, M3, M4).
 *
 * A 216px popover anchored to a 44px button at the edge of a 390px screen is
 * either clipped or covering the card it belongs to, so on a phone these are
 * sheets at the bottom edge. Chrome is shared by all three; only the padding
 * differs between a content sheet and a menu sheet.
 *
 * No entrance animation, here as everywhere else in this product.
 */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  background: rgba(13, 14, 15, 0.8);
  border: 0;
  padding: 0;
  width: 100%;
}

.sheet {
  width: 100%;
  background: var(--c-neutral-0);
  border-top: 1px solid var(--c-neutral-3);
  border-radius: 16px 16px 0 0;
  padding: 10px 16px 22px;
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  row-gap: 14px;
  text-align: left;
}

.sheet-menu {
  padding: 10px 10px 22px;
  row-gap: 2px;
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 100px;
  background: var(--c-neutral-4);
  margin: 0 auto 6px;
  flex: none;
}

.sheet-title {
  font: var(--t-h8-500);
  color: var(--c-white);
  margin: 0;
  overflow-wrap: anywhere;
}

.sheet-menu .sheet-title {
  padding: 4px 6px 8px;
}

.sheet-body {
  font: var(--t-body-primary-300);
  color: var(--c-neutral-11);
  margin: 0;
}

.sheet-keeps {
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
  margin: 0;
}

.sheet-label {
  font: var(--t-body-small-500);
  color: var(--c-neutral-9);
  margin: 0;
}

/* One row of the row menu. 48px effective, which is the floor for anything
   in the content area. */
.sheet-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: none;
  border-radius: 10px;
  padding: 15px 16px;
  font: var(--t-body-big-400);
  color: var(--c-neutral-12);
  cursor: pointer;
  transition:
    background-color var(--transition-default),
    color var(--transition-default);
}

.sheet-item:hover {
  background: var(--c-neutral-1);
  color: var(--c-white);
}

.sheet-item-danger {
  color: var(--c-red);
}

.sheet-rule {
  height: 1px;
  background: var(--c-neutral-2);
  margin: 6px 10px;
}

/* The link, as a value rather than a field somebody should type in, with the
   one button most people came for inside it. */
.sheet-link {
  display: flex;
  align-items: center;
  column-gap: 10px;
  border: 1px solid var(--c-neutral-3);
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--c-bg-black);
}

.sheet-link output {
  flex: 1 1 auto;
  min-width: 0;
  font: var(--t-code-400);
  color: var(--c-neutral-11);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-link .button {
  flex: none;
  height: 32px;
  padding: 0 14px;
}

.sheet-actions {
  display: flex;
  column-gap: 10px;
}

.sheet-actions .button {
  flex: 1 1 0;
  min-width: 0;
  height: 48px;
}

.sheet .button-block {
  width: 100%;
  height: 48px;
}

.sheet-fine {
  font: var(--t-body-small-300);
  color: var(--c-neutral-9);
  margin: 0;
}

/* The same removable chips as the desktop invitation modal. */
.sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sheet-chip {
  display: inline-flex;
  align-items: center;
  column-gap: 8px;
  height: 32px;
  padding: 0 6px 0 12px;
  border: 1px solid var(--c-neutral-3);
  border-radius: 100px;
  font: var(--t-body-small-300);
  color: var(--c-neutral-11);
}

.sheet-chip button {
  appearance: none;
  border: 0;
  background: none;
  color: var(--c-neutral-9);
  width: 20px;
  height: 20px;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
}

.sheet-chip button:hover {
  color: var(--c-white);
}

/* The sheet takes focus so the trap has somewhere to start; it is not
   something anybody pressed, so it is not drawn as focused. */
.sheet:focus {
  outline: none;
}
