/*
Theme Name: SLE CSR
Theme URI: https://slecsr.com
Description: Simple, accessible block theme for the Salt Lake Express CSR knowledge hub. Child of Twenty Twenty-Five.
Author: Dealio
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
Text Domain: sle-csr
*/

/* ---------- Base ---------- */
:root {
  --sle-navy: #123a63;
  --sle-blue: #0c5b94;
  --sle-gold: #f2c94c;
  --sle-red: #d90000;
  --sle-bg: #f6f8fb;
  --sle-line: #d8e2ea;
}

/* Strong, visible focus for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--sle-gold);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px var(--sle-navy);
}

.wp-block-post-content a:not(.wp-block-button__link) { text-decoration: underline; text-underline-offset: .15em; }
.wp-block-post-content a:not(.wp-block-button__link):hover { text-decoration-thickness: 2px; }

/* ---------- Header ---------- */
.sle-header { background: #fff; border-bottom: 5px solid var(--sle-gold); }
.sle-header .wp-block-site-title a { color: var(--sle-navy); text-decoration: none; }
.sle-header .wp-block-navigation a { padding: .35rem .6rem; border-radius: 6px; }
.sle-header .wp-block-navigation a:hover, .sle-header .wp-block-navigation .current-menu-item > a { background: var(--sle-bg); color: var(--sle-navy); }

/* ---------- Content ---------- */
.wp-block-post-title { color: var(--sle-navy); }
.wp-block-post-content h2, .wp-block-post-content h3 { color: var(--sle-navy); }
.wp-block-post-content > h2 { border-bottom: 2px solid var(--sle-line); padding-bottom: .25em; margin-top: 2em; }

/* Section navigation on hub pages */
.wp-block-page-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; padding: 0; list-style: none; }
.wp-block-page-list li a { display: block; background: #fff; border: 1px solid var(--sle-line); border-left: 6px solid var(--sle-blue); border-radius: 10px; padding: .8rem 1rem; text-decoration: none; font-weight: 600; color: var(--sle-navy); }
.wp-block-page-list li a:hover { background: var(--sle-bg); border-left-color: var(--sle-gold); }

/* Collapsible sections */
.wp-block-details { border: 1px solid var(--sle-line); border-radius: 10px; padding: 0 1rem; margin-bottom: .75rem; background: #fff; }
.wp-block-details summary { cursor: pointer; font-weight: 700; color: var(--sle-navy); padding: .8rem 0; }
.wp-block-details[open] summary { border-bottom: 1px solid var(--sle-line); margin-bottom: .75rem; }

/* Notices */
.sle-notice { border-left: 6px solid var(--sle-blue); background: var(--sle-bg); padding: .9rem 1.1rem; border-radius: 8px; margin: 1.25rem 0; }
.sle-notice p { margin: 0; }
.sle-notice-warning { border-left-color: #e0a100; background: #fff8e1; }
.sle-notice-danger { border-left-color: var(--sle-red); background: #fdecec; }
.sle-notice-success { border-left-color: #1e8449; background: #eaf7ee; }

/* Tables (block + TablePress) */
.wp-block-table table, .tablepress { border-collapse: collapse; width: 100%; }
.wp-block-table th, .wp-block-table td, .tablepress th, .tablepress td { border: 1px solid var(--sle-line); padding: .5rem .7rem; text-align: left; vertical-align: top; }
.wp-block-table thead th, .tablepress thead th { background: var(--sle-navy); color: #fff; }
.wp-block-table tbody tr:nth-child(even) td { background: var(--sle-bg); }
.wp-block-table { overflow-x: auto; }

/* Legacy inline-styled HTML cards: never overflow on small screens */
.wp-block-html { max-width: 100%; overflow-x: auto; }
.wp-block-html img, .wp-block-html table { max-width: 100%; }

/* Images */
.wp-block-image img { height: auto; border-radius: 8px; }

/* Forms (Forminator) */
.forminator-custom-form .forminator-label { font-weight: 700; color: var(--sle-navy); }
.forminator-custom-form .forminator-button-submit { background: var(--sle-navy) !important; }

/* Breadcrumb on child pages */
.sle-breadcrumb { font-size: .95rem; margin-bottom: .5rem; }
.sle-breadcrumb a { color: var(--sle-blue); }

/* Footer */
.sle-footer a { color: #fff; }

/* Ultimate Member forms */
.um { max-width: 520px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
