/* Chat with Pete — bottom-right messenger dock */

.pete-chat-messenger {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2600;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

.pete-chat-fab,
.pete-chat-panel {
  pointer-events: auto;
}

.pete-chat-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.45);
  background: linear-gradient(180deg, #1a2436 0%, #0d141f 100%);
  color: #f0e6c8;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

.pete-chat-fab:hover,
.pete-chat-fab-open {
  border-color: rgba(201, 162, 39, 0.8);
  color: #ffe9a8;
}

.pete-chat-panel {
  width: min(360px, calc(100vw - 28px));
  height: min(460px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(8, 12, 20, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  overflow: hidden;
}

.pete-chat-panel[hidden] {
  display: none !important;
}

.pete-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
  background: rgba(201, 162, 39, 0.08);
}

.pete-chat-title {
  margin: 0;
  font-family: Cinzel, "Times New Roman", serif;
  font-size: 0.95rem;
  color: #f0e6c8;
  letter-spacing: 0.04em;
}

.pete-chat-sub {
  margin: 4px 0 0;
  font-size: 0.68rem;
  line-height: 1.35;
}

.pete-chat-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.pete-chat-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pete-chat-empty {
  margin: 12px 0;
  font-size: 0.82rem;
}

.pete-chat-bubble {
  max-width: 92%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.pete-chat-bubble-user {
  align-self: flex-end;
  background: rgba(40, 70, 120, 0.35);
}

.pete-chat-bubble-pete {
  align-self: flex-start;
  background: rgba(201, 162, 39, 0.12);
}

.pete-chat-meta {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #9aa3b2);
  margin-bottom: 4px;
}

.pete-chat-body {
  font-size: 0.86rem;
  line-height: 1.45;
  color: #e8edf5;
  white-space: pre-wrap;
  word-break: break-word;
}

.pete-chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(201, 162, 39, 0.2);
  background: rgba(0, 0, 0, 0.25);
}

.pete-chat-compose textarea {
  width: 100%;
  resize: none;
  min-height: 52px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a1018;
  color: #e8edf5;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.86rem;
}

.pete-chat-send {
  align-self: end;
  min-width: 72px;
}

@media (max-width: 720px) {
  .pete-chat-messenger {
    right: 10px;
    bottom: 10px;
  }

  .pete-chat-panel {
    width: min(100vw - 20px, 360px);
    height: min(52vh, 420px);
  }
}
