.bootcamp-tutor-button {
  background: var(--ink);
  border: 1px solid var(--ink);
  bottom: 22px;
  color: var(--paper);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 12px 14px;
  position: fixed;
  right: 22px;
  z-index: 80;
}

.bootcamp-tutor-button:hover,
.bootcamp-tutor-button:focus {
  background: var(--paper);
  color: var(--ink);
}

.bootcamp-tutor-panel {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  bottom: 78px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
  display: grid;
  font-size: 13px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(680px, calc(100vh - 110px));
  position: fixed;
  right: 22px;
  width: min(430px, calc(100vw - 44px));
  z-index: 90;
}

.bootcamp-tutor-panel[hidden],
.bootcamp-tutor-button[hidden] {
  display: none;
}

.bootcamp-tutor-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 16px;
}

.bootcamp-tutor-head h2 {
  font-size: 19px;
  margin: 0 0 4px;
}

.bootcamp-tutor-head p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.bootcamp-tutor-close,
.bootcamp-tutor-copy,
.bootcamp-tutor-clear {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 8px;
}

.bootcamp-tutor-close:hover,
.bootcamp-tutor-copy:hover,
.bootcamp-tutor-clear:hover,
.bootcamp-tutor-close:focus,
.bootcamp-tutor-copy:focus,
.bootcamp-tutor-clear:focus {
  background: var(--soft);
}

.bootcamp-tutor-log {
  display: grid;
  gap: 10px;
  overflow: auto;
  padding: 14px;
}

.bootcamp-tutor-message {
  border: 1px solid var(--line);
  padding: 10px;
}

.bootcamp-tutor-message.user {
  background: var(--soft);
}

.bootcamp-tutor-message.assistant {
  background: var(--paper);
}

.bootcamp-tutor-label {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.bootcamp-tutor-message p {
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  white-space: pre-wrap;
}

.bootcamp-tutor-resources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.bootcamp-tutor-resource {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 7px;
  text-decoration: none;
}

.bootcamp-tutor-resource:hover,
.bootcamp-tutor-resource:focus {
  background: var(--soft);
  color: var(--ink);
}

.bootcamp-tutor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
}

.bootcamp-tutor-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.bootcamp-tutor-form textarea {
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
  min-height: 68px;
  padding: 10px;
  resize: vertical;
  width: 100%;
}

.bootcamp-tutor-form-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.bootcamp-tutor-form-row .toolbar {
  margin-top: 0;
}

.bootcamp-tutor-privacy {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.bootcamp-tutor-status {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

@media (max-width: 620px) {
  .bootcamp-tutor-panel {
    border-bottom: 0;
    bottom: 0;
    max-height: 82vh;
    right: 0;
    width: 100vw;
  }

  .bootcamp-tutor-button {
    bottom: 16px;
    right: 16px;
  }
}
