.bamsi-channels[hidden] { display: none; }
.bamsi-channels {
  position: fixed;
  inset: 76px 0 0;
  z-index: 35;
  overflow: auto;
  padding: 20px 44px 88px 122px;
  background: #18191b;
  color: #f2eff6;
  font-family: inherit;
  animation: bamsi-channel-enter 220ms ease both;
}
.bamsi-channels-content { width: min(1040px, 100%); margin-inline: auto; }
.bamsi-channels h1, .bamsi-channels h2, .bamsi-channel-sheet h2 { margin: 0 0 18px; font-size: 25px; }
.bamsi-channels h1 { font-family: inherit; font-size: 23px; font-weight: 700; letter-spacing: -.035em; }
.bamsi-channels h2 { margin-top: 36px; font-size: 21px; }
.bamsi-channels-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 312px)); gap: 16px; }
.bamsi-channels-grid[data-group="channels"] { grid-template-columns: minmax(0, 312px) 104px; align-items: start; }
.bamsi-channel-control {
  border: 1px solid #4b435d;
  border-radius: 999px;
  background: #332d45;
  color: #f2eff6;
  padding: 10px 16px;
  font: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}
.bamsi-channel-control:hover:not(:disabled) { background: #443b58; }
.bamsi-channel-control:disabled { cursor: default; opacity: .62; }
.bamsi-channel-control:focus-visible { outline: 2px solid #b3a2df; outline-offset: 3px; }
.bamsi-channel-add {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: min(104px, 100%);
  aspect-ratio: 1;
  align-self: start;
  justify-self: start;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #332d45;
  color: #f2eff6;
}
.bamsi-channel-add::before, .bamsi-channel-add::after {
  content: "";
  grid-area: 1 / 1;
  inline-size: 22px;
  block-size: 4px;
  border-radius: 1px;
  background: currentColor;
}
.bamsi-channel-add::after { rotate: 90deg; }
.bamsi-channel-tile {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-content: start;
  align-items: center;
  min-height: 104px;
  padding: 14px 16px;
  border: 1px solid #3d3947;
  border-radius: 18px;
  background: #25242b;
  text-align: left;
}
.bamsi-channel-tile strong { font-size: 17px; }
.bamsi-channel-tile small { grid-column: 2; color: #b9b5c5; font-size: 13px; padding-right: 48px; }
.bamsi-channel-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  color: #e8defb;
  background: #3b334e;
  font-size: 12px;
  font-weight: 750;
}
.bamsi-channel-icon img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.bamsi-channel-icon[data-icon="plus"] { font-size: 23px; }
.bamsi-channel-switch {
  position: absolute;
  right: 16px;
  bottom: 15px;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #4a4652;
}
.bamsi-channel-switch::before {
  content: "";
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 14px;
  border-radius: 50%;
  background: #ded9e8;
  transition: translate 170ms ease;
}
.bamsi-channel-switch[data-connected="true"] { background: #568d71; }
.bamsi-channel-switch[data-connected="true"]::before { translate: 16px 0; }
.bamsi-channel-dialog {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 25px;
  background: transparent;
  color: #f2eff6;
  font-family: Arial, Helvetica, sans-serif;
}
.bamsi-channel-dialog[open] { animation: bamsi-channel-enter 180ms ease-out both; }
.bamsi-channel-dialog::backdrop { background: #09090db8; animation: bamsi-channel-dim 180ms ease-out both; }
.bamsi-channel-dialog.is-closing { animation: bamsi-channel-enter 160ms ease reverse both; }
.bamsi-channel-dialog.is-closing::backdrop { animation: bamsi-channel-dim 160ms ease reverse both; }
.bamsi-channel-sheet {
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #494353;
  border-radius: inherit;
  background: #25242b;
}
.bamsi-channel-sheet header, .bamsi-channel-device { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bamsi-channel-sheet h2 { margin: 0; }
.bamsi-channel-sheet header button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #35313e;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}
.bamsi-channel-body, .bamsi-channel-body form { display: grid; gap: 12px; margin-top: 16px; }
.bamsi-channel-body p, .bamsi-channels-status { margin: 0; color: #c2becc; font-size: 14px; line-height: 1.45; }
.bamsi-channels-status:not(:empty) { margin-top: 12px; }
.bamsi-channel-body label { display: grid; gap: 7px; font-size: 14px; }
.bamsi-channel-body input, .bamsi-channel-body select {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #494451;
  border-radius: 12px;
  background: #1c1b21;
  color: #f2eff6;
  color-scheme: dark;
  font: inherit;
}
.bamsi-channel-device { padding-block: 8px; border-bottom: 1px solid #423e4b; }
@keyframes bamsi-channel-enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes bamsi-channel-dim { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .bamsi-channels { inset-block-start: 65px; padding: 14px 14px 100px; }
  .bamsi-channels-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bamsi-channels-grid[data-group="channels"] { grid-template-columns: minmax(0, 1fr) 76px; }
  .bamsi-channel-add { align-self: center; }
  .bamsi-channel-sheet { padding: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .bamsi-channels, .bamsi-channel-dialog[open], .bamsi-channel-dialog::backdrop { animation: none; }
  .bamsi-channel-control, .bamsi-channel-switch::before { transition: none; }
}


.bamsi-channel-token{position:relative}
.bamsi-channel-token input{padding-right:48px}
.bamsi-channel-token .bamsi-channel-token-eye{position:absolute;inset:0 5px 0 auto;margin:auto 0;width:38px;height:36px;padding:0;display:grid;place-items:center;background:transparent;border:0}
.bamsi-channel-token-eye:not(.is-visible) .bamsi-eye-slash{display:none}

.bamsi-channel-invites[hidden], .bamsi-channel-invites-list[hidden] { display: none; }
.bamsi-channel-invites form { margin-top: 0; }
.bamsi-channel-invites-list { display: grid; gap: 10px; }
.bamsi-channel-invites-list h3 { margin: 8px 0 0; font-size: 16px; }
.bamsi-channel-invite { display: grid; gap: 8px; min-width: 0; padding: 12px; border: 1px solid #3d3947; border-radius: 14px; }
.bamsi-channel-invite-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bamsi-channel-invite strong { overflow-wrap: anywhere; }
.bamsi-channel-invite button { justify-self: start; }

.bamsi-channel-browsers { display: grid; gap: 8px; padding-bottom: 12px; border-bottom: 1px solid #423e4b; }
.bamsi-channel-browsers .bamsi-channel-device { border-bottom: 0; }

.bamsi-channel-body form[hidden] { display: none; }
.bamsi-channel-help-link { justify-self: start; font-size: 13px; color: #d2c3ff; }
.bamsi-channel-body a.bamsi-channel-control { text-align: center; text-decoration: none; }
