﻿/* ===================================================================
   MCCD Overrides (CLEAN)
   Purpose: brand colors, spacing polish, safe component tweaks.
   IMPORTANT:
   - Do NOT style .cards, .grid, #shortcut-grid (layout/typography belong to baseline/finalizer).
   - Do NOT set display/white-space/overflow on containers that could hold grids.
   - Do NOT reset H/P typography (the 9/29 baseline owns card fonts).
   =================================================================== */

/* ---- Brand palette variables (fallbacks) ---- */
:root{
  --brand-green-600: #135e3b;   /* matches heading color on homepage */
  --brand-green-500: #19764b;
  --brand-green-050: #eef6f1;   /* same as --green-050 used for card bg */
  --text-900: #1f2937;          /* near rgb(31,41,55) */
  --text-700: #3b3b3b;          /* matches homepage paragraph color */
  --link: #135e3b;
  --link-hover: #0f4b2f;
  --border-200: #e5e7eb;
  --radius: 14px;
}

/* ---- Base document polish (safe) ---- */
html, body { scroll-behavior: smooth; }
body{
  color: var(--text-900);
  background-color: #fff;
}

/* ---- Links ---- */
a{
  color: var(--link);
  text-decoration: none;
}
a:hover, a:focus{
  color: var(--link-hover);
  text-decoration: underline;
}

/* ---- Buttons (generic) ---- */
.button, .btn, button, input[type="submit"], input[type="button"]{
  border-radius: var(--radius);
  border: 1px solid var(--border-200);
  padding: .625rem 1rem;
  cursor: pointer;
  background: #fff;
  color: var(--text-900);
}
.button--primary, .btn--primary, .btn.primary{
  background: var(--brand-green-600);
  color: #fff;
  border-color: var(--brand-green-600);
}
.button--primary:hover, .btn--primary:hover, .btn.primary:hover{
  background: var(--brand-green-500);
  border-color: var(--brand-green-500);
}

/* ---- Forms (safe) ---- */
input[type="text"], input[type="search"], input[type="email"],
select, textarea{
  border: 1px solid var(--border-200);
  border-radius: var(--radius);
  padding: .5rem .75rem;
  width: 100%;
  box-sizing: border-box;
}
label{ display: inline-block; margin-bottom: .25rem; }

/* ---- Tables (safe) ---- */
table{ width: 100%; border-collapse: collapse; }
th, td{ padding: .5rem .75rem; border-bottom: 1px solid var(--border-200); }
thead th{ text-align: left; }

/* ---- Panels/sections (no frames around grids) ---- */
/* Default: keep panels subtle */
.panel, section.panel{
  background: #fff;
  border: 1px solid var(--border-200);
  border-radius: var(--radius);
  box-shadow: none;
  padding: 1rem;
}

/* If a panel contains a card grid, remove panel frame so the grid cards are the UI.
   Requires :has() (supported in modern Chrome/Edge/Safari). */
.panel:has(.cards), .panel:has(.grid), .panel:has(#shortcut-grid),
section.panel:has(.cards), section.panel:has(.grid), section.panel:has(#shortcut-grid){
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* ---- Utilities (safe) ---- */
.hidden{ display: none !important; }
.visually-hidden{
  position: absolute !important;
  height: 1px; width: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

/* ===================================================================
   WHAT WE INTENTIONALLY DO NOT TOUCH HERE:
   - .cards, .grid, #shortcut-grid layout/typography -> baseline/finalizer
   - h1/h2/h3/p sizes/weights/colors inside cards -> baseline/finalizer
   - grid wrapping/columns/white-space/display -> baseline/finalizer
   =================================================================== */

   /* ===== Search UI (safe, brand-consistent) ===== */
:root{
  --search-radius: 14px;
  --search-border: #e5e7eb;
  --search-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.04);
}

.search, .search-bar, .search-panel, #search, form.search {
  display: block;
  margin: 0 0 1rem;
}

.search input[type="search"],
.search input[type="text"],
.search-bar input[type="search"],
.search-bar input[type="text"],
#search input[type="search"],
#search input[type="text"],
form.search input[type="search"],
form.search input[type="text"]{
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--search-border);
  border-radius: var(--search-radius);
  padding: .625rem .875rem;
  font: inherit;
  line-height: 1.4;
  background-color: #fff;
  box-shadow: var(--search-shadow);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.search input[type="search"]:focus,
.search input[type="text"]:focus,
.search-bar input[type="search"]:focus,
.search-bar input[type="text"]:focus,
#search input[type="search"]:focus,
#search input[type="text"]:focus,
form.search input[type="search"]:focus,
form.search input[type="text"]:focus{
  outline: none;
  border-color: var(--brand-green-500, #19764b);
  box-shadow: 0 0 0 3px rgba(25,118,75,.15), var(--search-shadow);
}

.search button,
.search-bar button,
#search button,
form.search button{
  border-radius: var(--search-radius);
  padding: .625rem 1rem;
  border: 1px solid var(--brand-green-600, #135e3b);
  background: var(--brand-green-600, #135e3b);
  color: #fff;
  cursor: pointer;
}

.search .controls,
.search-bar .controls,
#search .controls,
form.search .controls{
  display: flex;
  gap: .5rem;
}

.search .controls input[type="search"],
.search-bar .controls input[type="search"],
#search .controls input[type="search"],
form.search .controls input[type="search"]{
  flex: 1 1 auto;
}

/* ===== Search UI (safe, brand-consistent) ===== */
:root{
  --search-radius: 14px;
  --search-border: #e5e7eb;
  --search-shadow: 0 1px 2px rgba(0,0,0,.06), 0 1px 1px rgba(0,0,0,.04);
}

.search, .search-bar, .search-panel, #search, form.search { display:block; margin:0 0 1rem; }

.search input[type="search"],
.search input[type="text"],
.search-bar input[type="search"],
.search-bar input[type="text"],
#search input[type="search"],
#search input[type="text"],
form.search input[type="search"],
form.search input[type="text"]{
  appearance:none; -webkit-appearance:none;
  width:100%; box-sizing:border-box;
  border:1px solid var(--search-border);
  border-radius:var(--search-radius);
  padding:.625rem .875rem;
  font:inherit; line-height:1.4;
  background:#fff; box-shadow:var(--search-shadow);
  transition:border-color .15s ease, box-shadow .15s ease;
}

.search input[type="search"]:focus,
.search input[type="text"]:focus,
.search-bar input[type="search"]:focus,
.search-bar input[type="text"]:focus,
#search input[type="search"]:focus,
#search input[type="text"]:focus,
form.search input[type="search"]:focus,
form.search input[type="text"]:focus{
  outline:none;
  border-color:var(--brand-green-500, #19764b);
  box-shadow:0 0 0 3px rgba(25,118,75,.15), var(--search-shadow);
}

.search button,
.search-bar button,
#search button,
form.search button{
  border-radius:var(--search-radius);
  padding:.625rem 1rem;
  border:1px solid var(--brand-green-600, #135e3b);
  background:var(--brand-green-600, #135e3b);
  color:#fff; cursor:pointer;
}

.search .controls,
.search-bar .controls,
#search .controls,
form.search .controls{ display:flex; gap:.5rem; }

.search .controls input[type="search"],
.search-bar .controls input[type="search"],
#search .controls input[type="search"],
form.search .controls input[type="search"]{ flex:1 1 auto; }
