#coopPanel {
  z-index: 80;
  padding: 24px;
  overflow: hidden;
}
.coop-dialog {
  width: min(900px, 100%);
  max-height: calc(100dvh - 48px);
  padding: 28px;
  background: #142d36;
  border: 1px solid #789a91;
  border-radius: 12px;
  box-shadow: 0 24px 100px #0009;
  color: #e6ecd6;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.coop-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.coop-heading h2 {
  font-size: 30px;
  margin: 4px 0;
}
.coop-heading small {
  color: #a5c4b5;
  letter-spacing: 2px;
}
.coop-dialog p {
  font-size: 17px;
  line-height: 1.5;
  margin: 0;
}
.coop-entry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}
.coop-entry-grid > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid #6b8c8055;
  border-radius: 8px;
}
.coop-dialog label {
  font-size: 16px;
  color: #cad9c8;
}
.coop-dialog input {
  font:
    600 18px 'Segoe UI',
    sans-serif;
  min-height: 46px;
  background: #0d222b;
  border: 1px solid #719084;
  border-radius: 5px;
  color: #f0edcf;
  padding: 10px 12px;
  box-sizing: border-box;
  min-width: 0;
  width: 100%;
}
.coop-dialog .primary,
.coop-dialog .secondary {
  font-size: 16px;
  min-height: 46px;
  padding: 12px 18px;
  margin: 0;
  min-width: 0;
}
.coop-dialog .primary {
  background: #dbdb9c;
  color: #20343a;
}
#coopName {
  max-width: 340px;
  margin-top: 8px;
}
#coopRoomTitle {
  font-size: 24px;
  margin: 0;
}
#coopMission {
  color: #b3cbbe;
  font-size: 15px;
  margin: 4px 0 12px;
}
.coop-roster {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.coop-roster li {
  background: #203e45;
  border: 1px solid #779c8655;
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.coop-roster b {
  font-size: 18px;
}
.coop-roster span {
  font-size: 15px;
  color: #c0cfc1;
}
.coop-roster [data-ready='true'] {
  border-color: #bcdba0;
}
.coop-invite {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}
.coop-invite input {
  font-size: 15px;
}
.coop-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
#coopHint {
  font-size: 15px;
  color: #bacdc0;
}
#coopStatus {
  min-height: 24px;
  font-size: 15px;
  color: #ebd69f;
}
#coopConnection {
  position: fixed;
  top: 74px;
  right: 24px;
  padding: 7px 12px;
  border: 1px solid #6a9789;
  background: #132d36ed;
  color: #e6e5bd;
  font:
    600 13px 'Segoe UI',
    sans-serif;
  border-radius: 4px;
  z-index: 35;
  pointer-events: none;
}
#openCoop {
  white-space: nowrap;
}
@media (max-height: 650px) {
  #coopPanel {
    padding: 12px;
  }
  .coop-dialog {
    padding: 16px 22px;
    gap: 10px;
    max-height: calc(100dvh - 24px);
  }
  .coop-heading h2 {
    font-size: 25px;
  }
  .coop-dialog p {
    font-size: 15px;
  }
  .coop-entry-grid {
    margin-top: 12px;
    gap: 16px;
  }
  .coop-entry-grid > div {
    padding: 14px;
    gap: 10px;
  }
  .coop-roster li {
    padding: 10px 14px;
    gap: 4px;
  }
  .coop-roster b {
    font-size: 16px;
  }
  .coop-dialog .primary,
  .coop-dialog .secondary {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 14px;
  }
  .coop-dialog input {
    min-height: 40px;
    padding: 8px 10px;
  }
  .coop-invite,
  .coop-actions {
    margin: 10px 0;
  }
  .coop-heading small {
    display: none;
  }
  #coopStatus {
    min-height: 20px;
  }
}
@media (max-width: 650px) {
  .coop-dialog {
    padding: 16px;
  }
  .coop-heading h2 {
    font-size: 23px;
  }
  .coop-entry-grid {
    gap: 10px;
  }
  .coop-entry-grid > div {
    padding: 12px;
  }
  .coop-invite {
    flex-wrap: wrap;
  }
  .coop-actions {
    gap: 8px;
  }
  .coop-roster b {
    font-size: 15px;
  }
  .coop-roster span {
    font-size: 13px;
  }
}
#copyInvite {
  min-width: 115px;
  white-space: nowrap;
}
#coopStatus:empty {
  display: none;
}
@media (max-height: 650px) and (min-width: 700px) {
  .coop-roster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .coop-roster li {
    padding: 12px 10px;
  }
  .coop-roster b {
    font-size: 15px;
  }
  .coop-roster span {
    font-size: 13px;
  }
  .coop-dialog {
    gap: 12px;
  }
}

/* Team choice belongs to each player's lobby seat. */
.coop-roster select {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  padding: 4px 8px;
  font:
    600 15px 'Segoe UI',
    sans-serif;
  color: #e6ecd6;
  background: #102b34;
  border: 1px solid #789a91;
  border-radius: 4px;
  background-image:
    linear-gradient(45deg, transparent 50%, #e6ecd6 50%),
    linear-gradient(135deg, #e6ecd6 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.coop-roster .coop-side {
  min-height: 36px;
  display: flex;
  align-items: center;
}
.coop-roster [data-team='0'] {
  border-left: 3px solid #80c1d4;
}
.coop-roster [data-team='1'] {
  border-left: 3px solid #ed9a77;
}
@media (max-height: 650px) {
  .coop-roster select,
  .coop-roster .coop-side {
    height: 30px;
    min-height: 30px;
    font-size: 13px;
  }
}

.coop-roster b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
