/* ── Section Themes ──────────────────────────────────────────────────────────
 *
 * Each scheme overrides CSS custom properties at the body level so colours
 * cascade through all blocks automatically.
 *
 * To add a new scheme:
 *   1. Add a .section-theme--{slug} block here.
 *   2. Add the slug to the ACF choices array in inc/sections.php.
 *
 * -------------------------------------------------------------------------- */


.section-theme--aa-blue {
  /* Page background */
  background-color: var(--wp--preset--color--sky);
  color: var(--wp--preset--color--primary);

  .wp-site-blocks>main{
    background-repeat: no-repeat;
    background-size: 70vh;
    background-position: top right;
    /* background-attachment: fixed; */
    /* background-position-x: 70vw; */
    /* background-position-y: 10vh; */
  }

  .card,
  .quick-links,
  .main-inner,
  table {
    background-color: var(--wp--preset--color--base);
    @supports (color: color-mix(in srgb, blue 50%, transparent)) {
      background-color: color-mix(in srgb, var(--wp--preset--color--base) 85%, transparent);
    }
    /* border-color: var(--wp--preset--color--yellow); */
  }

  /* Cards on the site default: news, event and post cards alike (cards.css).
     Sets the same custom properties a card colour does, and only on lists left
     on the site default, so a block that picks its own colour still wins. */
  .aa-cards--colour-default{
    --aa-card-bg: var(--wp--preset--color--red-shade);
    @supports (color: color-mix(in srgb, blue 50%, transparent)) {
      --aa-card-bg: color-mix(in srgb, var(--wp--preset--color--base) 70%, transparent);
    }
    --aa-card-fg: var(--wp--preset--color--primary);
    --aa-card-border: var(--wp--preset--color--primary);
    --aa-card-hover: var(--wp--preset--color--yellow);
  }

  /* Secondary nav */
  .page-anchor-nav {
    ol, ul {
      li a{
        border-color: var(--wp--preset--color--base);
        color: var(--wp--preset--color--base);
        /* background: var(--wp--preset--color--red-shade); */

        &:hover{
            background: var(--wp--preset--color--base);
            color: var(--wp--preset--color--primary);
        }
      }
    }
  }

}

/* ── First Nations ─────────────────────────────────────────────────────────── */

.section-theme--first-nations {

  /* Page background */
  background-color: var(--wp--preset--color--red-shade);
  color: var(--wp--preset--color--base);

  .wp-site-blocks>main{
    background-repeat: no-repeat;
    background-size: contain;
    background-attachment: fixed;
    background-position-x: 70vw;
    background-position-y: 10vh;
  }
  a{
    color: var(--wp--preset--color--base);
  }
  .site-header, 
  .site-footer{
    background: var(--wp--preset--color--cream);
    color: var(--wp--preset--color--primary);
    
    a, 
    a.wp-block-site-logo:hover {
      color: inherit;
    }
    a:hover{
      color: var(--wp--preset--color--yellow);
    }

    hr{
      border: 0;
      border-top: 1px solid var(--wp--preset--color--primary);
    }

    .kh-header__nav {
      p {
        color: inherit;
      }
    }
  }

  .wp-block-media-text figure img,
  .wp-block-media-text figure svg{
    background: var(--wp--preset--color--base);
  }

  /* Cards */
  .card,
  .quick-links,
  .main-inner,
  table {
    background-color: var(--wp--preset--color--red-shade);
    @supports (color: color-mix(in srgb, red 50%, transparent)) {
      background-color: color-mix(in srgb, var(--wp--preset--color--red-shade) 75%, transparent);
    }
    border-color: var(--wp--preset--color--yellow);
  }

  .quick-links{
    h4{
      background-color: var(--wp--preset--color--red-shade);
      color: var(--wp--preset--color--base);
      border-right: 1px solid var(--wp--preset--color--yellow);
    }
  }

  .card{
    &,
    li,
    h3.wp-block-post-title,
    a{
      border-color: var(--wp--preset--color--yellow);
      color: var(--wp--preset--color--base);
    }
  }

  /* Breakout Box */
  .wp-block-group.is-style-breakout-box {
      border-color: var(--wp--preset--color--yellow);
      background-color: var(--wp--preset--color--sky);
      @supports (color: color-mix(in srgb, red 50%, transparent)) {
        background-color: color-mix(in srgb, var(--wp--preset--color--orange) 50%, transparent);
      }
  }

  /* Cards on the site default: news, event and post cards alike (cards.css).
     Sets the same custom properties a card colour does, and only on lists left
     on the site default, so a block that picks its own colour still wins. */
  .aa-cards--colour-default{
    --aa-card-bg: var(--wp--preset--color--red-shade);
    @supports (color: color-mix(in srgb, red 50%, transparent)) {
      --aa-card-bg: color-mix(in srgb, var(--wp--preset--color--red-shade) 75%, transparent);
    }
    --aa-card-fg: var(--wp--preset--color--base);
    --aa-card-border: var(--wp--preset--color--yellow);
    --aa-card-hover: var(--wp--preset--color--yellow);
  }

  /* Secondary nav */
  .page-anchor-nav {
    ol, ul {
      li a{
        border-color: var(--wp--preset--color--yellow);
        background: var(--wp--preset--color--red-shade);

        &:hover{
            background: var(--wp--preset--color--yellow);
            color: var(--wp--preset--color--primary);
        }
      }
    }
  }

  /* Tables */
  :where(.wp-block-table > table td) {
    border-color: var(--wp--preset--color--yellow) !important;
  }
  .wp-block-table{
    border-color: var(--wp--preset--color--yellow);

    &.is-style-stripes {
      border-bottom-color: var(--wp--preset--color--yellow);
      tbody tr:nth-child(odd) {
        background-color: var(--wp--preset--color--red-shade);
        @supports (color: color-mix(in srgb, red 50%, transparent)) {
          background-color: color-mix(in srgb, var(--wp--preset--color--yellow) 15%, transparent);
        }
      }
    }

    table{
      background-color: var(--wp--preset--color--red-shade);
      @supports (color: color-mix(in srgb, red 50%, transparent)) {
        background-color: color-mix(in srgb, var(--wp--preset--color--red-shade) 75%, transparent);
      }      

      thead{
        background-color: var(--wp--preset--color--yellow);
        color: var(--wp--preset--color--red-shade);
        th{
          border-right-color: var(--wp--preset--color--red-shade);
        }
      }
    }

    &.is-style-filled-first-column td:first-of-type{
      background-color: var(--wp--preset--color--primary);
      @supports (color: color-mix(in srgb, red 50%, transparent)) {
        background-color: color-mix(in srgb, var(--wp--preset--color--red) 85%, transparent);
      }
      color: var(--wp--preset--color--base);
    }
    &.is-style-filled-first-column tr:not(:last-of-type) td:first-of-type{
      border-bottom-color: var(--wp--preset--color--red-shade) !important;
      border-top-color: var(--wp--preset--color--red-shade) !important;
    }
    &.striped tr:nth-child(even) {
      background-color: rgba(0, 0, 0, 0.05);
    }
  }
}