/**
 * CSS overrides and customizations for the AUX PHP theme. This should be very minimal!
 * This file is loaded on both the front-end and the back-end after the main theme
 * stylesheet (https://aux.tamu.edu/{$auxVersion}/styles/aux-styles.css).
 *
 * @since 1.0.0
 */

 /* hiding default chrome x button in search fields */
input[type="search"]::-webkit-search-decoration, input[type="search"]::-webkit-search-cancel-button, input[type="search"]::-webkit-search-results-button, input[type="search"]::-webkit-search-results-decoration {
  display: none;
}

 /* wordpress gallery and captions styling */
 .wp-element-caption {
    background: transparent;
    color: black;
    padding: 1rem;
    text-align: left;
    text-shadow: none;
    padding:.5rem;
    font-family: "Work Sans", sans-serif;
    font-size: .9rem;
    font-weight: 400;
    background: none;
    border: none;
    line-height: 1.5;
    font-style: italic;
  }
  .wp-block-gallery figcaption {
    text-align: left;
  }
  .caption__attribution {
    line-height: 1.5;
    font-style: italic;
    margin-top: 0.75rem;
    display: block;
  }
  figure.wp-block-gallery.has-nested-images {
    margin-top: 3.25rem;
    margin-bottom: 3.25rem;
  }
  
  .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before {
    backdrop-filter: none;
    content: none;
    -webkit-mask-image: none;
    mask-image: none;
    max-height: 100%;
    content: none;
    position: unset;
  }
  
  .wp-block-gallery.has-nested-images figure.wp-block-image figcaption {
    box-sizing: none;
    color: black;
    text-align: left;
    text-shadow: none;
    background: transparent;
    color: black;
    padding: 1rem;
    text-align: left;
    text-shadow: none;
    padding:.5rem;
    font-family: "Work Sans", sans-serif;
    font-size: .9rem;
    font-weight: 400;
    background: none;
    border: none;
    position: unset;
  }
  
  .wp-block-gallery.has-nested-images figcaption {
    flex-basis: 0;
    flex-grow: 0;
    flex-basis: 100%;
    flex-grow: 1;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) {
    @media screen and (max-width: 350px) {
      width: calc(100% - var(--wp--style--unstable-gallery-gap, 16px)/2);
    }
    a, img {
      flex: 1 auto;
      height:auto;
      width:100% 
    }
  }

  /* mobile clamp styles - move to AUX at a later date */
  .menu-header-navigation-container {
    width: 100%;
  }
  
  @media (max-width: 1000px) {
    .aux-footer .aux-footer__container .footer__column {
      width: 33%;
    }
  }
  
  @media (max-width: 500px) {
    .aux-footer .aux-footer__container {
      flex-direction: column;
    }
    .aux-footer .aux-footer__container .footer__column {
      width: 99%;
    }
  }

  @media screen and (max-width:768px) {
    .news-page-header.news-page-header--featured {
      margin-bottom:0;
      .news-page-header__container {
        padding-bottom:3rem;
        .news-page-header__title {
          h1 {
            font-size: 3rem;
          }
        }
      }
    }
  }

/* featured news captioned media styles */
body.single-news.aux-header--featured {
  .aux-container--fluid-mw {
    .aux-body-content {
      padding:2rem 2rem 0 2rem;
      background:#ffffff;
      @media screen and (max-width:768px) {
        padding-top:0;
      }
    }
  }
  .captioned-media:first-child {
    margin: -2.5rem -2.5rem 2.5rem -2.5rem;
    @media screen and (max-width:768px) {
      margin:0 0 2.5rem 0;
    }
    &.captioned-media--small {
      margin-top:0;
      margin-bottom: 1rem;
      &.captioned-media--left {
        margin-right:1rem;
        margin-left:0;
      }
      &.captioned-media--right {
        margin-left:1rem;
        margin-right:0;
      }
    }
  }
}

/* pagination tweaks - move to AUX at a later date */
.pagination {margin-top:0;}
.pagination .pagination__list .pagination__item .pagination__page.dots {
  pointer-events: none;
  border: none;
}

 /* news post breakout styles */
 body.single-news.aux-sidebar--none {
  .section-wrap {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: calc(-1 * (100vw - 100%) / 2);
    padding-bottom:3rem;
  }
  .section-wrap.section-wrap--maroon, .section-wrap.section-wrap--dynamic-maroon, .section-wrap.section-wrap--gray-100, .section-wrap.section-wrap--dynamic-gray-100, .section-wrap.section-wrap--gray-900, .section-wrap.section-wrap--dynamic-gray-900 {
    margin-bottom:1rem;
  }
  .captioned-media.captioned-media--slab, .feature-cta, .cta-feature, .media-feature, .split-feature {
    width: 100vw;
    max-width: 100vw;
    position: relative;
    left: calc(-1 * (100vw - 100%) / 2);
  }
  .captioned-media.captioned-media--slab {
    margin-bottom:4rem;
  }
  .feature-cta, .cta-feature, .media-feature, .split-feature {
    margin-bottom:1rem;
  }
}

/* Search results */
.search-result {
  .term-link {
    height: 1.5rem;

    &::after {
      display: none;
    }

    img {
      height: 1.5rem;
      margin-right: .25rem;
      width: auto;
      float: left;
    }
  }
}

/* signup feature - gravity forms styling */
.signup-feature__content {
  .gform_wrapper {
    .gform_heading {
      .gform_title {
        text-transform: uppercase;
        font-size: 2.25rem;
      }
      .gform_description {
        margin-top:.5rem;
      }
    }
    form {
      display:flex;
      align-items:center;
      @media screen and (max-width:450px) {
        flex-direction:column;
      }
      label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0,0,0,0);
        white-space: nowrap;
        border-width: 0;
      }
      .gform_body {
        width:100%;
        input {
          height:60px;
        }
      }
      .gform_footer {
        @media screen and (max-width:450px) {
          width:100%;
        }
        .gform_button {
          margin:0;
          height:60px;
          border-radius:0;
          background:#500000;
          border:solid #500000 2px;
          &:hover, &:active, &:focus {
            background:#732f2f;
          }
          @media screen and (max-width:450px) {
            width:100%;
          }
        }
      }
    }
  }
}

.signup-feature--bold {
  .signup-feature__content {
    .gform_wrapper {
      .gform_heading {
        .gform_title {
          font-family: "Work Sans", Arial, sans-serif;
          font-weight: 700;
          font-size: 2.625rem;
          text-transform:none;
          font-style:italic;
          &::before {
            content: "";
            border-bottom: 7px solid #732f2f;
            display: block;
            width: 2.5rem;
            margin-bottom: 0.5rem;
          }
        }
      }
      form {
        .gform_body {
          input {
            border: solid #500000 4px;
          }
        }
      }
    }
  }
}

.signup-feature--elegant {
  .signup-feature__content {
    .gform_wrapper {
      .gform_heading {
        .gform_title {
          font-family: Georgia, Times, serif;
          font-size: 2.5rem;
          text-transform:none;
          font-style:italic;
        }
      }
      form {
        .gform_body {
          input {
            border: solid #500000 1px;
          }
        }
      }
    }
  }
}
/* gforms validation error */
.signup-feature__content {
  .gform_validation_error {
    .gform_submission_error {
      font-size:1.1rem;
      font-family:"Open Sans", sans-serif;
      line-height:1.5;
      color:#95463b;
      margin-bottom:1rem;
      &::before {
        content: "";
        mask-image: url(https://aux.tamu.edu/icons/aux-prod-icons/circle-outline-xmark.svg);
        -webkit-mask-image: url(https://aux.tamu.edu/icons/aux-prod-icons/circle-outline-xmark.svg);
        -webkit-mask-repeat: no-repeat;
        -webkit-mask-size: 25px;
        mask-repeat: no-repeat;
        mask-size: 25px;
        display: block;
        width: 25px;
        height: 25px;
        background: #d04343;
        margin-bottom: .25rem;
      }
    }
    form {
      align-items: flex-end;
      .gfield--type-email {
        display:flex;
        flex-direction:column;
        .gfield_validation_message {
          order: 1;
          margin-bottom:.5rem;
          color:#d04343;
        }
        .ginput_container_email {
          order:2;
          input {
            border:solid #d04343 2px;
          }
        }
      }
      .gform_footer {
        margin-top:.75rem;
      }
    }
  }
}
/* gforms confirmation message styles */
.gform_confirmation_message {
  display:flex;
  flex-wrap:wrap;
  gap: .5rem;
  align-items: center;
  svg {
    width: 30px;
    height: 30px;
    fill: #732f2f;}
  h2 {
    font-family: "Open Sans", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #500000;
    &::before {
      content: "";
      mask-image: url(https://aux.tamu.edu/icons/aux-prod-icons/circle-outline-check.svg);
      -webkit-mask-image: url(https://aux.tamu.edu/icons/aux-prod-icons/circle-outline-check.svg);
      -webkit-mask-repeat: no-repeat;
      -webkit-mask-size: 25px;
      mask-repeat: no-repeat;
      mask-size: 25px;
      display: block;
      width: 25px;
      height: 25px;
      background: #732f2f;
      margin-bottom: .25rem;
    }
  }
  p {
    margin-bottom:0;
  }
}