/* Inky — Innerspace brand theme (Innerspace Brand Guide 2024), matching the intranet.
   Loads after style.css and only overrides; delete this file's <link> to revert.
   Olive #94906B (hero) + Pale Grey #E0D9CD (sub), black and white.
   Gilroy where installed, otherwise Montserrat. Square corners, no shadows. */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

body.light-mode,
body {
  --bg-color: #ffffff;
  --card-bg: #ffffff;
  --border-color: #E0D9CD;
  --text-main: #000000;
  --text-muted: #4a4642;
  --accent-color: #94906B;
  --assistant-bg: #F1EDE6;
  --assistant-text: #000000;
  --hover-bg: #E0D9CD;
  --hover-border: #94906B;
  --brand-olive: #94906B;
  --brand-pale: #E0D9CD;
}

/* Dark theme, for people whose computer is set to dark mode (not used inside the intranet). */
body:not(.light-mode) {
  --bg-color: #000000;
  --card-bg: #141414;
  --border-color: #3a3833;
  --text-main: #ffffff;
  --text-muted: #CCC4BC;
  --assistant-bg: #1f1e1b;
  --assistant-text: #f2efe9;
  --hover-bg: #2a2925;
}

body {
  font-family: Gilroy, Montserrat, 'Century Gothic', system-ui, sans-serif;
}

/* Square corners throughout, per the brand guide. */
.auth-card, .chat-box, .message, #user-input, #send-btn, #google-login-btn,
.logout-btn, .pending-item, #admin-view input, #admin-view textarea, #admin-view button,
#admin-view > div, .message.assistant code {
  border-radius: 0 !important;
}

/* Header: black bar with the reversed brandmark, like the intranet. */
.chat-container { padding-top: 0; }
.chat-header {
  background: #000000;
  color: #ffffff;
  margin: 0 -20px;
  padding: 14px 20px;
}
.chat-header h1, .chat-header h1 span { color: #ffffff; }
.chat-header h1 span { opacity: 0.8; }
.brand-divider { background-color: #94906B; }
#user-email-display { color: #CCC4BC !important; }
.chat-header .logout-btn { color: #ffffff; border-color: #4a4642; }
.chat-header .logout-btn:hover { background: #94906B; border-color: #94906B; color: #000000; }

/* Buttons: Olive with black text (white on Olive fails contrast). */
#send-btn, #google-login-btn, #publish-knowledge-btn {
  background-color: #94906B !important;
  color: #000000 !important;
  font-weight: 700;
}
#send-btn:hover, #google-login-btn:hover, #publish-knowledge-btn:hover {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body:not(.light-mode) #send-btn:hover,
body:not(.light-mode) #google-login-btn:hover { background-color: #E0D9CD !important; color: #000000 !important; }

#user-input { border: 2px solid var(--border-color); }
#user-input:focus { border-color: #94906B; outline: none; }

/* Messages */
.message.user { background-color: #94906B; color: #000000; font-weight: 500; }
.message.assistant { border-color: var(--brand-pale); }
.message.assistant a { color: inherit; text-decoration: underline; text-decoration-color: #94906B; text-underline-offset: 2px; }
.message.assistant th { background: #E0D9CD; color: #000000; }
body:not(.light-mode) .message.assistant th { background: #2a2925; color: #ffffff; }
.chat-box { border: 2px solid var(--brand-pale); }

/* Sign-in card */
.auth-container { background: #E0D9CD; }
body:not(.light-mode) .auth-container { background: #000000; }
.auth-card { border: 0; }

/* Quick questions */
.faq-chip {
  border-radius: 0 !important;
  border: 1px solid #000000 !important;
  background: transparent !important;
  color: var(--text-main) !important;
  font-family: inherit;
}
.faq-chip:hover { background: #94906B !important; border-color: #94906B !important; color: #000000 !important; }
body:not(.light-mode) .faq-chip { border-color: #CCC4BC !important; }
.faq-h { color: var(--text-muted); font-weight: 600; letter-spacing: 0.08em; }
.faq-toggle { font-family: inherit; }

:focus-visible { outline: 3px solid #94906B; outline-offset: 2px; }

/* ---------- Inside the intranet's side panel (?embed=1) ---------- */
body.inky-embedded .chat-container {
  max-width: none !important;
  height: 100vh;
  padding: 0 12px 12px;
  gap: 10px;
}
body.inky-embedded .chat-header {
  margin: 0 -12px;
  padding: 8px 12px;
}
/* The intranet already shows the Innerspace header and "Ask Inky" title. */
body.inky-embedded .header-branding,
body.inky-embedded #user-email-display { display: none !important; }
body.inky-embedded .header-actions { width: 100%; justify-content: flex-end; }
body.inky-embedded .chat-box { padding: 12px; }
body.inky-embedded .message,
body.inky-embedded .message.user { max-width: 100%; }
body.inky-embedded .auth-container { min-height: 100vh; padding: 16px; }
body.inky-embedded .auth-card { max-width: none; }
/* The build label sits under the "Questions are logged" note in the narrow panel. */
body.inky-embedded #build-version { display: none; }
#build-version { font-family: inherit; color: var(--text-muted); }
