@font-face {
  font-family: Poppins;
  src: url('poppins-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('poppins-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('poppins-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Poppins;
  src: url('poppins-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --tpa-font: Poppins, Calibri, system-ui, sans-serif;
  /* LibreChat installs its theme font variables inline. Keep its separate code font. */
  --theme-font-family: var(--tpa-font) !important;
  --theme-display-font-family: var(--tpa-font) !important;
  --tpa-green: #00553a;
  --tpa-hover: #1c683e;
  --tpa-orange: #f07b23;
  --tpa-rule: linear-gradient(to right, var(--tpa-green) 0 calc(100% - 2.125rem), var(--tpa-orange) 0);
}

.tpa-auth-brand {
  width: 100%;
  padding: 1.3125rem;
  display: grid;
  justify-items: center;
}

.tpa-auth-brand img {
  display: block;
  width: auto;
  aspect-ratio: 2000 / 1478;
  object-fit: contain;
  flex: none;
}

.tpa-auth-brand img {
  height: 7rem;
}

#root > div:has(.tpa-auth-brand):has(input[name='email']) {
  justify-content: center;
  background-color: rgb(var(--surface-primary-alt));
}

#root > div:has(.tpa-auth-brand) main:has(input[name='email']) {
  flex-grow: 0;
  padding: 0 0.8125rem 1.3125rem;
}

#root > div:has(.tpa-auth-brand) main div:has(> h1):has(input[name='email']) {
  max-width: 26rem;
  width: 100%;
  padding: 1.3125rem;
  border: 1px solid rgb(var(--border-light));
  border-radius: 0.8125rem;
  background: var(--tpa-rule) top / 100% 2px no-repeat rgb(var(--surface-primary));
}

#root > div:has(.tpa-auth-brand) main h1 {
  font-size: 1.5rem;
  line-height: 1.4;
}

.tpa-chat-header {
  background: var(--tpa-rule) bottom / 100% 2px no-repeat rgb(var(--surface-primary));
}

/* Compact header: the circle mark only (original colours, square crop), legible at 40 px. */
.tpa-chat-brand {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex: none;
  margin-inline: 0.5rem;
}

.dark .tpa-auth-brand img {
  content: url('tpa-logo-reverse.png');
}

.dark .tpa-chat-header {
  background-color: var(--tpa-green);
  border-bottom: 1px solid rgb(var(--border-light));
}

[data-testid='composer-surface'] [data-testid='send-button']:not(:disabled) {
  color: #fff;
  background: var(--tpa-green);
}

[data-testid='composer-surface'] [data-testid='send-button']:not(:disabled):hover {
  background: var(--tpa-hover);
}

@media (forced-colors: active) {
  .tpa-chat-header { border-bottom: 1px solid CanvasText; }
}
