/*
Theme Name: CCDP
Theme URI: 
Author: 
Author URI: 
Description: Theme for the Cabarrus County Democratic Party
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: ollie
Text Domain: ccdp
Tags: 
*/

/*
primary: #03246b
primary-accent: #3663a6
primary-alt: #bbddff
primary-alt-accent: #263042
main: #000000
main-accent: #B6C7D9
base: #fff
secondary: #3b5570
tertiary: #F8F7F9
border-light: #DADEE3
border-dark: #444B57
*/

/* === Table Block === */

/* Default borders — use brand accent blue */
.wp-block-table :where(:not([class*='has-'])) td,
.wp-block-table :where(:not([class*='has-'])) th {
  border-color: var(--wp--preset--color--primary-accent);
}

/* thead — dark brand blue background, white text */
.wp-block-table thead:where(:not([class*='has-'])) {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
  border-bottom-color: var(--wp--preset--color--primary);
}

.wp-block-table thead:where(:not([class*='has-'])) th {
  border-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base);
}

/* tfoot — medium blue background, white text */
.wp-block-table tfoot:where(:not([class*='has-'])) {
  background-color: var(--wp--preset--color--primary-accent);
  color: var(--wp--preset--color--base);
  border-top-color: var(--wp--preset--color--primary-accent);
}

.wp-block-table tfoot:where(:not([class*='has-'])) td {
  border-color: var(--wp--preset--color--primary-accent);
  color: var(--wp--preset--color--base);
}

/* Stripes style variant */
.wp-block-table.is-style-stripes:where(:not([class*='has-'])) {
  border-bottom-color: var(--wp--preset--color--main-accent);
}

figure.wp-block-table.is-style-stripes
  tbody
  tr:nth-child(odd):where(:not([class*='has-'])) {
  background-color: var(--wp--preset--color--border-light);
}

.wp-block-table.is-style-stripes
  tbody
  tr:nth-child(even):where(:not([class*='has-'])) {
  background-color: var(--wp--preset--color--base);
}

/* Caption */
.wp-block-table :where(figcaption) {
  color: var(--wp--preset--color--main);
}

.wp-block-table {
  max-height: 400px;
  overflow-y: auto;
  width: 100%;
}

/* Height variants — set via the "Table Height" panel in the block editor */
.wp-block-table.ccdp-height-400 {
  max-height: 400px;
}
.wp-block-table.ccdp-height-600 {
  max-height: 600px;
}
.wp-block-table.ccdp-height-800 {
  max-height: 800px;
}
.wp-block-table.ccdp-height-none {
  max-height: none;
  overflow-y: visible;
}

.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.wp-block-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--wp--preset--color--primary);
  z-index: 1;
}

.wp-block-table th,
.wp-block-table td {
  padding: 10px;
}

/* === Site Title Block === */
.wp-block-site-title {
  max-width: 160px;
  font-size: 1rem;
  line-height: 1;
}

@media (min-width: 961px) {
  .wp-block-site-title {
    max-width: 250px;
    font-size: var(--wp--preset--font-size--medium);
  }
}

/* === Navigation Block === */
.wp-block-navigation:not(.has-background)
  .wp-block-navigation__submenu-container {
  background-color: var(--wp--preset--color--primary-alt);
  border: 1px solid var(--wp--preset--color--primary-accent);
}

/*=== Alignment Styles === */

@media (max-width: 767px) {
  .wp-block-column.is-style-center-until-tablet * {
    text-align: center;
    justify-content: center;
  }
}

@media (max-width: 1023px) {
  .wp-block-column.is-style-center-until-desktop {
    text-align: center;
    justify-content: center;
  }
}

/* === EmbedPress === */
.wp-block-embedpress-embedpress-calendar,
.wp-block-embedpress-embedpress-calendar iframe {
  width: 100% !important;
  height: 600px !important;
}

.gutenberg-google-forms-wraper iframe {
  margin: 0 auto;
}
