/*
 Theme Name:   Beaver Builder Child
 Theme URI:    https://lectionary.debug.victas.uca.org.au
 Description:  Child theme for Beaver Builder Theme
 Author:       Victas Web Team
 Author URI:   https://lectionary.debug.victas.uca.org.au
 Template:     bb-theme
 Version:      1.0
*/
/* =========================================================
   UCA VICTAS – ACCESSIBLE BASE STYLES
   WCAG 2.1 AA – Beaver Builder Friendly
========================================================= */

/* =========================
   Default global styles (Accessible)
========================= */

/* Links: not color-only + keyboard focus */
a {
  color: #E42127;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}
a:hover,
a:focus {
  color: #353535;
  text-decoration-thickness: 2px;
}
a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
  background-color: rgba(0, 95, 204, 0.10);
}

/* Text spacing */
p { margin: 0 0 15px 0; }

/* Headings: keep your fonts but don’t crush readability */
h1 {
  font-family: 'Source Sans Pro', sans-serif;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}
h4 {
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

/* Lists: keep spacing, but don’t remove semantics */
ol li, ul li { margin-bottom: 15px; }

/* Avoid removing bullets globally (screen reader + semantics safe) */
.uca-page-content ul {
  color: #000000;
  font-size: 16px;
  line-height: 1.5em;
  margin-bottom: 30px !important;
  padding-left: 1.5rem; /* ensures bullets align */
}

/* Remove the risky global selector ".uca-page-content ul, li"
   (it affects ALL li site-wide). Target list items properly instead. */
.uca-page-content ul li {
  margin: 0 0 0.75em 0;
}

/* If you still want custom bullets visually, do it ONLY when you
   also keep list-style on OR apply to a special class (not globally). */

/* =====================================
   TABLES – ACCESSIBLE (WCAG 2.1 AA)
===================================== */

table {
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  border-bottom: 3px solid #E42127;
  background-color: #ffffff;
}

/* Caption: REQUIRED for screen readers */
table caption {
  caption-side: top;
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #000000;
}

/* Header cells */
table th {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: left;
  border: 1px solid #ddd;
  padding: 12px 16px;
}

/* Data cells */
table td {
  color: #000000;
  border: 1px solid #ddd;
  padding: 12px 16px;
  vertical-align: top;
}

/* Zebra striping – visual aid (not meaning) */
table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Hover + keyboard focus parity */
table tbody tr:hover,
table tbody tr:focus-within {
  background-color: #f4f4f4;
}

/* Ensure links inside tables are clear */
table a {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}
table a:hover,
table a:focus {
  color: #E42127;
}
table a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Remove legacy last-column hack safely */
table th.last {
  border-right: 1px solid #ddd;
}

/* =====================================
   BLOCKQUOTE – ACCESSIBLE (WCAG 2.1 AA)
===================================== */

.fl-page-content blockquote {
  background-color: #f9f9f9;
  border-left: 5px solid #E42127;
  margin: 1.5em 0;
  padding: 1.25rem 1.5rem;
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  line-height: 1.4;
  color: #000000;
  position: relative;
}

/* Decorative quote – visually helpful, screen-reader safe */
.fl-page-content blockquote::before {
  content: "“";
  font-size: 4rem;
  color: #ccc;
  position: absolute;
  top: 0.25rem;
  left: 0.5rem;
  line-height: 1;
  aria-hidden: true;
}

/* Remove closing quote to avoid duplication */
.fl-page-content blockquote::after {
  content: none;
}

/* Paragraphs inside blockquote */
.fl-page-content blockquote p {
  margin: 0;
  display: block;
  text-transform: none; /* REMOVE forced uppercase */
}

/* Cite / attribution */
.fl-page-content blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-style: normal;
  color: #353535;
}

/* =====================================
   HEADER SEARCH – ACCESSIBLE
===================================== */

.site-header .search-form {
  position: relative;
}

/* Search input */
.site-header .search-field {
  background-color: transparent;
  background-image: url(images/search-icon.png);
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 24px 24px;
  border: 2px solid transparent;
  cursor: pointer;
  height: 40px;
  padding-left: 40px;
  width: 40px;
  transition: width 300ms ease, background-color 300ms ease;
}

/* Keyboard + focus support */
.site-header .search-field:focus,
.site-header .search-field:focus-visible {
  width: 230px;
  background-color: #ffffff;
  border-color: #005fcc;
  cursor: text;
  outline: none;
}

/* Placeholder contrast */
.site-header .search-field::placeholder {
  color: #555;
}

/* Hide submit button visually, not from screen readers */
.search-submit {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}


/* =====================================
   FULL SCREEN SEARCH – ACCESSIBLE
===================================== */

#full-screen-search {
  position: fixed;
  inset: 0;
  background-color: #000000;
  z-index: 999999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

/* Open state */
#full-screen-search.open {
  opacity: 1;
  visibility: visible;
}

/* Trap visual focus */
#full-screen-search:focus-within {
  outline: none;
}

/* Close button */
#full-screen-search button.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 2rem;
  color: #ffffff;
  background: none;
  border: none;
  cursor: pointer;
}

/* Focus state for close button */
#full-screen-search button.close:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 4px;
}

/* Search form container */
#full-screen-search form {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

/* Search input wrapper */
#full-screen-search form div {
  width: 90%;
  max-width: 600px;
}

/* Search input */
#full-screen-search input[type="search"] {
  width: 100%;
  height: auto;
  padding: 1.25rem 2rem;
  font-size: 2rem;
  border-radius: 999px;
  border: 3px solid transparent;
  background-color: #eeeeee;
  color: #000000;
}

/* Placeholder contrast */
#full-screen-search input[type="search"]::placeholder {
  color: #444;
}

/* Focus state */
#full-screen-search input[type="search"]:focus-visible {
  border-color: #005fcc;
  outline: none;
}

/* Hide submit button accessibly */
#full-screen-search input[type="submit"] {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  .site-header .search-field,
  #full-screen-search {
    transition: none;
  }
}


/* =====================================
   WP FILE DOWNLOAD – ACCESSIBLE
===================================== */

.wpfd-content {
  font-weight: normal;
  box-sizing: border-box;
  background: none !important;
  overflow-x: auto; /* keyboard + mobile friendly */
}

/* File download links */
.wpfd-content a,
.wpfd-content a.wpfd_downloadlink {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.15em;
}

/* Hover + focus parity */
.wpfd-content a:hover,
.wpfd-content a:focus-visible {
  color: #E42127;
}

/* Strong keyboard focus */
.wpfd-content a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}

/* Table wrapper */
.wpfd-content-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0 !important;
}

/* Header cells */
.wpfd-content-table th {
  background-color: #E42127;
  color: #ffffff;
  font-weight: 600;
  text-align: left;
  padding: 12px;
  border: 1px solid #ddd;
}

/* Data cells */
.wpfd-content-table td {
  padding: 12px;
  border: 1px solid #ddd;
  vertical-align: top;
}

/* Zebra striping */
.wpfd-content-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* Hover + keyboard focus */
.wpfd-content-table tbody tr:hover,
.wpfd-content-table tbody tr:focus-within {
  background-color: #f4f4f4;
}

/* WPFD icons must be decorative */
.wpfd-content i,
.wpfd-content .wpfd-icon {
  pointer-events: none;
}

/* Folder tree */
ul.jqueryFileTree {
  font-family: inherit;
  font-size: 16px !important;
  line-height: 1.6 !important;
  padding-left: 1rem;
}

/* Tree links */
ul.jqueryFileTree a {
  text-decoration: underline;
}

/* Focus visibility */
ul.jqueryFileTree a:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

.wpfd-content .wpfd_download_btn {
  background: #E42127;
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 16px;
  text-decoration: none;
  display: inline-block;
}

/* Hover + focus */
.wpfd-content .wpfd_download_btn:hover,
.wpfd-content .wpfd_download_btn:focus-visible {
  background: #353535;
  outline: 3px solid #005fcc;
  outline-offset: 3px;
}


.season-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.season-tab {
  padding: 10px 16px;
  border: 1px solid #ccc;
  background: #e53138;
  cursor: pointer;
}

.season-tab[aria-selected="true"] {
  background: #353535;
  color: #fff;
}

[role="tabpanel"] {
  margin-top: 20px;
}

.wpfd-content-table .wpfd-table thead th {
  color:#fff !important;
}
