* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: #ffffff;
  font-family: Verdana, Geneva, Arial, sans-serif;
  color: #000000;
  font-size: 13px;
}

.topbar {
  width: 100%;
  height: 6px;
  background: #000000;
}

#uid-box {
  position: fixed;
  top: 12px;
  right: 20px;
  border: 1px solid #999999;
  background: #f5f5f5;
  padding: 4px 10px;
  font-weight: bold;
  font-size: 12px;
}

#uid-box span {
  color: #6b3e12;
  letter-spacing: 1px;
}

.container {
  max-width: 700px;
  margin: 40px auto;
  text-align: center;
}

.logo {
  max-width: 320px;
  width: 60%;
  height: auto;
  margin-bottom: 10px;
}

.tagline {
  font-weight: bold;
  margin: 6px 0 24px 0;
}

#connect-panel {
  margin-bottom: 8px;
}

#target-uid {
  width: 220px;
  padding: 5px 6px;
  border: 2px solid #6b3e12;
  font-size: 13px;
  text-transform: uppercase;
}

button {
  font-family: inherit;
  font-size: 12px;
  border: 1px solid #999999;
  background: #e6e6e6;
  padding: 5px 12px;
  margin-left: 6px;
  cursor: pointer;
}

button:hover {
  background: #d4d4d4;
}

#status-msg {
  color: #b00000;
  font-size: 12px;
  min-height: 16px;
}

#chat-panel {
  display: none; /* hidden until a pairing is confirmed by the server (chat_started) */
  margin-top: 20px;
  border: 1px solid #cccccc;
  padding: 14px;
  text-align: left;
}

#chat-panel.visible {
  display: block;
}

#chat-with {
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
}

#messages {
  height: 260px;
  overflow-y: auto;
  border: 1px solid #eeeeee;
  padding: 8px;
  margin-bottom: 10px;
  background: #fafafa;
}

.msg {
  margin: 0 0 6px 0;
  padding: 4px 8px;
  max-width: 75%;
  word-wrap: break-word;
}

.msg.me {
  background: #eaf0ff;
  margin-left: auto;
  text-align: right;
}

.msg.them {
  background: #f0f0f0;
  margin-right: auto;
}

.msg.system {
  color: #888888;
  font-style: italic;
  text-align: center;
  background: none;
  max-width: 100%;
}

.message-input-row {
  display: flex;
}

#message-text,
#room-message-text {
  flex: 1;
  padding: 6px;
  border: 1px solid #999999;
}

.footer {
  margin-top: 40px;
  color: #777777;
  font-size: 11px;
}

a {
  color: #0000cc;
}

/* ===================== Open Chat (rooms) ===================== */

.hidden {
  display: none !important;
}

.divider {
  border: none;
  border-top: 1px solid #dddddd;
  margin: 28px 0 20px 0;
}

.section-title {
  font-weight: bold;
  margin: 0 0 10px 0;
}

.hint {
  color: #888888;
  font-weight: normal;
  font-size: 11px;
}

#open-chat-menu,
#create-choice-panel {
  margin-bottom: 8px;
}

button.secondary {
  background: #f5f5f5;
  color: #555555;
}

#join-panel {
  text-align: left;
  border: 1px solid #eeeeee;
  background: #fafafa;
  padding: 12px;
  margin-bottom: 8px;
}

#join-by-id-row {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dddddd;
}

#room-id-input {
  width: 220px;
  padding: 5px 6px;
  border: 2px solid #6b3e12;
  font-size: 13px;
  text-transform: uppercase;
}

#public-rooms-items {
  min-height: 20px;
  margin-bottom: 8px;
}

.public-room-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid #eeeeee;
  background: #ffffff;
  margin-bottom: 6px;
  font-size: 12px;
}

.public-room-row button {
  margin-left: 0;
}

#room-status-msg {
  color: #b00000;
  font-size: 12px;
  min-height: 16px;
}

#room-panel {
  display: none;
  margin-top: 10px;
  border: 1px solid #cccccc;
  padding: 14px;
  text-align: left;
}

#room-panel.visible {
  display: block;
}

#room-with {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 8px;
  border-bottom: 1px solid #dddddd;
  padding-bottom: 6px;
}

#room-type-label {
  color: #6b3e12;
  font-weight: normal;
}

#room-members-label {
  color: #555555;
  font-weight: normal;
  font-size: 12px;
}

#leave-room-btn {
  margin-left: 12px;
}

#room-messages {
  height: 260px;
  overflow-y: auto;
  border: 1px solid #eeeeee;
  padding: 8px;
  margin-bottom: 10px;
  background: #fafafa;
}

.msg-from {
  font-weight: bold;
  color: #6b3e12;
}
