/* ════════════════════════════════════════════════════════════════════
   Solania Branding CSS

   Solar palette: warm amber/gold accent on a dark navy base.
   Overrides core CSS variables where the core exposes them.
════════════════════════════════════════════════════════════════════ */

:root {
  --solania-primary: #80c2c1;
  --solania-bg:      #c5eded;
  --solania-accent:  #507787;
}

#solania-announcement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: .5rem 1rem;
  background: var(--solania-accent);
  color: #fff;
  font-size: .85rem;
  text-align: center;
}

#solania-announcement button {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #fff;
  opacity: .75;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

#solania-announcement button:hover {
  opacity: 1;
}

#app-title {
  color: var(--solania-primary) !important;
  font-weight: 700;
}

#left-header {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* #left-col is a flex column where #thread-list (flex:1) is the only
   region that shrinks. Solania stacks two more fixed-height blocks into
   that column — #solania-ad-slot and #solania-footer below — on top of
   core's own header/search/new-chat/footer, none of which core sized
   with this extra chrome in mind. Combined with #left-col's
   overflow:hidden, a short viewport (or core's footer wrapping to a
   second row once "Deleted Chats" appears) squeezes #thread-list toward
   zero instead of the sidebar just scrolling. Give the chat list a floor
   and let the sidebar scroll internally so nothing collapses invisibly. */
#thread-list {
  min-height: 7rem;
}

#left-col {
  overflow-x: hidden;
  overflow-y: auto;
}

#solania-footer {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: .3rem;
  padding: .4rem;
  border-top: 1px solid var(--border);
}

#solania-footer-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
}

#solania-footer-buttons .lf-btn {
  flex: 1;
  min-width: fit-content;
}

#solania-donate-btn {
  display: block;
  text-align: center;
  text-decoration: none;
  background: #0070ba;
  color: #fff !important;
  font-weight: 600;
}

#solania-donate-btn:hover {
  background: #003087;
}

.solania-quota {
  display: block;
  width: 100%;
  font: inherit;
  font-size: .75rem;
  color: var(--solania-primary);
  background: none;
  border: none;
  opacity: .8;
  padding: .3rem .6rem;
  text-align: center;
  cursor: pointer;
}
.solania-quota:hover,
.solania-quota:focus-visible {
  opacity: 1;
  text-decoration: underline;
}
.solania-quota--active {
  color: #2ecc71;
  opacity: 1;
  font-weight: 600;
}

#solania-ad-slot {
  padding: .5rem;
  margin: .5rem;
  min-height: 90px;
  background: rgba(255,255,255,.03);
  border-radius: .4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.solania-ad-placeholder {
  font-size: .7rem;
  color: #64748b;
  text-align: center;
}

.solania-feed-ad {
  margin: 1rem auto;
  padding: .6rem;
  max-width: 640px;
  min-height: 64px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

#solania-legal {
  text-align: center;
  font-size: .7rem;
  color: #64748b;
  padding: .3rem 0 .1rem;
}

#solania-legal a {
  color: #64748b;
  text-decoration: none;
}

#solania-legal a:hover {
  color: var(--solania-primary);
  text-decoration: underline;
}

/* ── hub: footer + ad banner ──────────────────────────────────────────
   The hub's layout is a centered single column (max-width:960px, see
   hub.css), unlike the app's sidebar-flex layout, so these are laid out
   and named separately from #solania-footer / #solania-ad-slot above. */

#solania-hub-ad-slot {
  max-width: 960px;
  margin: 1.2rem auto 0;
  padding: 0 1.2rem;
  display: flex;
  justify-content: center;
}

#solania-hub-ad-slot .solania-ad-placeholder {
  min-height: 60px;
  padding: .6rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: .5rem;
}

#solania-hub-footer {
  max-width: 960px;
  margin: 1.2rem auto 2rem;
  padding: 1rem 1.2rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.solania-hub-quota {
  font-size: .8rem;
  color: var(--solania-primary);
  opacity: .85;
}

#solania-hub-footer-buttons {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  justify-content: center;
}

#solania-hub-donate-btn {
  background: #0070ba;
  color: #fff !important;
  border-color: transparent;
}

#solania-hub-donate-btn:hover {
  background: #003087;
}

#solania-hub-feedback-form {
  display: none;
  flex-direction: column;
  gap: .5rem;
  width: 100%;
  max-width: 360px;
}

#solania-hub-feedback-form.open {
  display: flex;
}

.solania-hub-feedback-status {
  font-size: .8rem;
  color: #64748b;
  text-align: center;
}

#solania-hub-legal {
  font-size: .7rem;
  color: #64748b;
}

#solania-hub-legal a {
  color: #64748b;
  text-decoration: none;
}

#solania-hub-legal a:hover {
  color: var(--solania-primary);
  text-decoration: underline;
}

/* ── consent gate ─────────────────────────────────────────────────
   Self-contained (no app.css/.btn or hub.css/.btn reuse) since the same
   file loads on both the app and the hub, whose button styles differ.
   z-index above core's #modal-bg (1000) and #busy-overlay (1100). */
#solania-consent-gate {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, .7);
}

#solania-consent-panel {
  max-width: 26rem;
  width: 100%;
  background: #0f172a;
  color: #cbd5e1;
  border: 1px solid #1e293b;
  border-radius: .6rem;
  padding: 1.5rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
}

#solania-consent-heading {
  color: var(--solania-primary);
  font-size: 1.25rem;
  margin: 0 0 1rem;
}

.solania-consent-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  margin-bottom: .8rem;
  font-size: .9rem;
  cursor: pointer;
}

.solania-consent-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: .2rem;
}

.solania-consent-row a {
  color: var(--solania-primary);
}

#solania-consent-enter {
  display: block;
  width: 100%;
  margin-top: .5rem;
  padding: .6rem;
  border: none;
  border-radius: .4rem;
  background: var(--solania-primary);
  color: #0f172a;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
}

#solania-consent-enter:disabled {
  opacity: .4;
  cursor: not-allowed;
}

#solania-consent-enter:not(:disabled):hover {
  filter: brightness(1.08);
}
