/* assets/theme-default.css
   iDontNews — Evergreen Dark Theme (optimized for legibility)
   - Deep green-charcoal base with emerald + warm orange accents
   - Text contrast tuned for readability on dark backgrounds
*/

:root {
  /* Surfaces & text */
  --bg:        #0b1110;  /* page background (evergreen charcoal) */
  --panel:     #111a17;  /* card top gradient */
  --muted:     #0f1c18;  /* card bottom gradient */
  --text:      #f2f7f5;  /* brighter main text */
  --subtle:    #bcd5ce;  /* secondary text (lighter mint gray) */
  --border:    #1e2f29;  /* softened outline for cards/dividers */
  --ring:      rgba(80, 226, 177, 0.35); /* emerald glow for focus */

  /* Emerald accent stack (links, chips, CTAs) */
  --accent:    #118a6a;  /* deep emerald */
  --accent-2:  #1fb287;  /* mid emerald */
  --accent-3:  #69f0c0;  /* bright mint-emerald */

  /* Status (reserved) */
  --danger:    #ff5c5c;

  /* Header (title/subtitle/bg) */
  --header-title:    #70f2c5;     /* brighter title */
  --header-subtitle: #b4e5d9;     /* lighter subtitle */
  --header-bg:       transparent; /* keep transparent for now */

  /* Summary hint (warm orange) */
  --hint-color: #ffc983;
  --hint-size:  0.8rem;
  --hint-font:  "Courier New", Courier, monospace;

  /* Expand/Collapse All buttons (warm orange) */
  --action-btn-text:  #0c1210;
  --action-btn-border:#ffc983;
  --action-btn-bg:    linear-gradient(180deg, rgba(255,201,131,.95),
                                              rgba(255,201,131,.75));

  /* Sources accordion “button” (emerald family) */
  --sources-cta-text:   var(--text);
  --sources-cta-border: #28c196;
  --sources-cta-bg:     linear-gradient(180deg, rgba(40,193,150,.22),
                                                rgba(40,193,150,.10));

  /* Shared spacing token */
  --card-pad: 16px;

  --base-font-size: 17px;
  --base-line-height: 1.6;

  --topic-title-size: 1.35rem;
  --topic-title-weight: 700;
  --topic-meta-size: 0.95em;

  --label-color: var(--subtle);
  --label-accent: var(--accent-2);
  --label-tracking: .1em;
  --label-size: .83rem;
  --label-weight: 750;
}

/* === UI Elements (moved here for theme cohesion) === */

/* Filter bar */
.filterbar {
  display: flex;
  align-items: center;
  justify-content: space-between;   /* chips center, hamburger right */
  gap: .75rem;
  padding: .5rem 1rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel), var(--muted));
  position: sticky;
  top: 0;
  z-index: 20;
}

/* Filters group stays centered */
.filterbar .filters-left {
  flex: 1;
  display: flex;
  justify-content: center;
}

/* Right side (hamburger area) sticks to edge */
.filters-right {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
/* Filter chips */
.filterbar .filter-chip {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.filterbar .filter-chip:hover {
  background: rgba(255,255,255,0.07);
}
.filterbar .filter-chip.active {
  border-color: var(--accent-3);
  background: rgba(105,240,192,0.15);
  box-shadow: 0 0 6px rgba(105,240,192,0.3);
}

/* Hamburger menu */
.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  padding: .4rem .5rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05);
  border-radius: .5rem;
  cursor: pointer;
  color: var(--text);
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

/* Popup dropdown menu */
.popup-menu {
  position: absolute;
  right: 0;
  top: calc(100% + .4rem);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: .5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  min-width: 200px;
  padding: .25rem;
  display: flex;
  flex-direction: column;
  z-index: 40;
}
.popup-menu a {
  padding: .5rem .75rem;
  color: var(--text);
  text-decoration: none;
  border-radius: .4rem;
}
.popup-menu a:hover {
  background: rgba(255,255,255,0.08);
}

/* Category badge & tags */
.topic .category-badge {
  margin-left: auto;
  font-size: .85rem;
  padding: .15rem .5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--subtle);
}
.tags-row .tag-chip {
  font-size: .8rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--subtle);
}

/* Text & block tweaks */
.section-label {
  color: var(--subtle);
}
p.tldr {
  color: var(--text);
}
