/*
Theme Name: Child Thrive Theme
Theme URI: http://thrivethemes.com/
Version: 1.0
Author: <a href="http://www.thrivethemes.com">Thrive Themes</a>
Description: Fully customizable, front end theme and template editing for WordPress has arrived! 
Template: thrive-theme
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, custom-everything
*/

/* =========================================================
   District Projects — Category Pill Colors
   ---------------------------------------------------------
   Colors the project category pill based on the post's
   category. WordPress adds a `category-<slug>` class to each
   project <article>; Thrive paints the pill via an inner
   `.tve-content-box-background` layer, which is what we recolor.

   Add these rules to your main (enqueued) child-theme stylesheet.
   ========================================================= */

/* 1. Palette tokens — tune every pill color from here */
:root {
	--pill-transportation: #F58020; /* orange */
	--pill-public-safety:  #263B91; /* navy   */
	--pill-mobility:       #c2973a; /* gold   */
	--pill-placemaking:    #D92B2A; /* red    */
	--pill-quality-of-life: #fdbf4a; /* yellow */

	--pill-text-light:     #FFFFFF; /* text on dark pills */
	--pill-text-dark:      #1E2A78; /* text on light pills (e.g. gold) */
}

/* 2. Per-category colors.
      NOTE: no broad "default" rule here on purpose — an over-specific
      fallback outweighs these and turns every pill one color. Any
      category not listed simply keeps Thrive's original pill color. */
article.category-transportation .tcb-post-list-cb > .tve-content-box-background {
	background-color: var(--pill-transportation) !important;
}
article.category-public-safety .tcb-post-list-cb > .tve-content-box-background {
	background-color: var(--pill-public-safety) !important;
}
article.category-mobility .tcb-post-list-cb > .tve-content-box-background {
	background-color: var(--pill-mobility) !important;
}
article.category-placemaking .tcb-post-list-cb > .tve-content-box-background {
	background-color: var(--pill-placemaking) !important;
}
article.category-quality-of-life .tcb-post-list-cb > .tve-content-box-background {
	background-color: var(--pill-quality-of-life) !important;
}

/* 3. Accessibility: the gold Mobility pill is too light for white
      text (fails WCAG AA), so switch its label to dark ink. */
article.category-mobility .tcb-post-list-cb .thrive-shortcode-content,
article.category-mobility .tcb-post-list-cb .thrv_text_element, 
article.category-quality-of-life .tcb-post-list-cb .thrive-shortcode-content,
article.category-quality-of-life .tcb-post-list-cb .thrv_text_element {
	color: var(--pill-text-dark) !important;
}