/* ── Smaller per-source headings in the citation side panel ──────── */
#side-view-content h2 {
  font-size: 1.05rem !important;
}
#side-view-content h3 {
  font-size: 0.95rem !important;
}

/* ── Double the height of the read-only "Rollenkontext" field ────── */
textarea#_readonly_context {
  min-height: 160px !important;
  height: 160px !important;
}

/* ── Scale logo to ~150% of its native 200x46 size (300x69) ──────── */
img.logo {
  width: 300px !important;
  height: 69px !important;
}

/* Make action buttons roomier and allow long follow-up questions to remain readable. */
[data-testid="message-actions"],
[data-testid="actions"],
.message-actions,
[class*="message-actions"] {
  display: flex;
  flex-wrap: wrap;
  margin-top: 8px;
  clear: both;
}

[data-testid="message-actions"] button,
[data-testid="actions"] button,
.message-actions button,
[class*="message-actions"] button {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.25;
  text-align: left;
  justify-content: flex-start;
  padding: 10px 12px;
}

/* Subtle hover movement so truncated text is easier to scan. */
[data-testid="message-actions"] button:hover,
[data-testid="actions"] button:hover,
.message-actions button:hover,
[class*="message-actions"] button:hover {
  text-indent: 6px;
  transition: text-indent 120ms ease-out;
}

/* Calmer styling for source PDF links in citation panels and messages. */
a[href*="/sources/pdf/"] {
  color: #1f4e79 !important;
  font-weight: 500;
  text-decoration: none;
}

a[href*="/sources/pdf/"]:hover {
  color: #163a5a !important;
  text-decoration: underline;
}

/* ── PDF.js viewer: full panel width ─────────────────────── */
.pdfViewer,
.pdfViewer .page,
#viewer {
  width: 150% !important;
  max-width: 150% !important;
}

/* ── Citation chips: consistent single-line height ──────── */
a.element-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60ch;
}

/* ── Follow-up questions on new line below message toolbar ── */
[data-testid="actions"] {
  width: 100%;
  margin-top: 4px;
}

/* ── Auto-height multiline textareas in settings ─────────── */
[data-testid="chat-settings-sidebar-content"] textarea {
  overflow: hidden !important;
  resize: none !important;
}

/* ── Self-registration form ──────────────────────────────── */
#gski-register-panel {
  width: 100%;
  margin: 16px auto 0;
  text-align: center;
}

.gski-reg-toggle {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 12px;
}

.gski-reg-toggle a {
  color: #90caf9;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.gski-reg-toggle a:hover {
  text-decoration: underline;
}

#gski-reg-form,
#gski-privacy-step {
  text-align: left;
  padding: 20px 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

#gski-reg-form h3,
#gski-privacy-step h3 {
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

#gski-privacy-text {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.88rem;
  line-height: 1.5;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 14px;
}

#gski-privacy-text p {
  margin: 0 0 10px;
}

#gski-privacy-text p:last-child {
  margin-bottom: 0;
}

#gski-privacy-continue {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: none;
  border-radius: 6px;
  background: #1976d2;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}

#gski-privacy-continue:hover {
  background: #1565c0;
}

#gski-reg-form input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 150ms;
}

#gski-reg-form input:focus {
  border-color: #90caf9;
}

#gski-reg-form input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

#gski-reg-submit {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 4px;
  border: none;
  border-radius: 6px;
  background: #1976d2;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms;
}

#gski-reg-submit:hover {
  background: #1565c0;
}

#gski-reg-submit:disabled {
  background: #555;
  cursor: not-allowed;
}

.gski-reg-msg-ok,
.gski-reg-msg-err {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  text-align: center;
}

.gski-reg-msg-ok {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.gski-reg-msg-err {
  background: rgba(244, 67, 54, 0.15);
  color: #e57373;
  border: 1px solid rgba(244, 67, 54, 0.3);
}
