/* WordPress integration and accessibility fixes layered over the legacy CSL styles. */

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
}

.site-header {
  width: 100%;
}

/* White navigation links need a dark surface before the page is scrolled too. */
#header {
  background-color: rgba(4, 9, 30, 0.9);
}

.site-header #logo img {
  display: block;
  max-width: 126px;
  width: 100%;
  height: auto;
}

.site-header .header-top-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.site-header .header-top-right a {
  margin-right: 0;
  white-space: nowrap;
}

.site-header .header-top-right .lnr {
  display: none;
}

.site-header .header-top-right .text {
  display: inline;
}

.csl-topline {
  color: #fff;
}

.nav-menu > li.menu-active > a,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current_page_item > a,
.nav-menu > li.current-menu-ancestor > a,
.nav-menu > li.current_page_parent > a {
  color: #f7631b;
}

#mobile-nav-toggle {
  border-radius: 0;
  padding: 5px;
  line-height: 1;
}

#mobile-body-overly:not([hidden]) {
  display: block;
}

body.mobile-nav-active #mobile-nav-toggle {
  color: #fff;
}

#site-main {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 60vh;
  margin: 0;
  padding: 0;
  text-align: left;
}

/* Keep the legacy full-width page sections from shrinking inside a centered flex main. */
#site-main > * + * {
  margin-top: 0;
}

.entry-content img,
.csl-post-image img {
  max-width: 100%;
  height: auto;
}

.csl-excerpt p:last-child {
  margin-bottom: 0;
}

.csl-pagination {
  margin: 35px 0;
  text-align: center;
}

.csl-pagination .nav-links > * {
  display: inline-block;
  margin: 0 4px;
  padding: 5px 10px;
}

.csl-back-link {
  margin-top: 35px;
}

.csl-status-page {
  min-height: 50vh;
  padding: 150px 0 80px;
}

.csl-map-link {
  flex: 0 0 100%;
  margin: 12px 15px 0;
  text-align: right;
}

.csl-status-page .primary-btn {
  margin-top: 15px;
}

.csl-contact-form {
  position: relative;
}

.csl-contact-form label.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  white-space: nowrap;
}

.csl-honeypot {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.csl-form-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-left: 4px solid #f7631b;
  background: #f7f7f7;
  text-align: left;
}

.csl-form-notice--success {
  border-color: #25813b;
}

.csl-form-notice--error {
  border-color: #b42318;
}

.csl-form-notice--info {
  border-color: #2271b1;
}

.csl-contact-form .form-control:focus {
  outline: 2px solid rgba(247, 99, 27, 0.35);
  outline-offset: 1px;
}

.csl-privacy-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

.csl-privacy-consent input {
  flex: 0 0 auto;
  margin-top: 4px;
  accent-color: #f7631b;
}

.footer-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.footer-contact a {
  color: #fff;
}

.footer-contact a:hover,
.footer-contact a:focus {
  color: #f7631b;
}

.wp-block-image img {
  height: auto;
}

.wp-block-gallery,
.wp-block-columns {
  margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
  .site-header .header-top-right a {
    font-size: 11px;
  }
}

@media (max-width: 767px) {
  .site-header .header-top-left {
    display: none;
  }

  .site-header .header-top-right {
    width: 100%;
    justify-content: flex-end;
  }

  .site-header .header-top-right .lnr {
    display: inline-block;
  }

  .site-header .header-top-right .text {
    display: none;
  }

  .footer-contact {
    align-items: flex-start;
    margin-top: 20px;
    text-align: left;
  }

  .csl-status-page {
    padding-top: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Do not let the fixed theme header collide with the WordPress toolbar. */
body.admin-bar #header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar #header {
    top: 46px;
  }
}
