/* =========================================================
   SRL GALLERY MANAGER: FRONT END
   Version 1.4.1
========================================================= */

.srl-gallery-manager {
  --srl-gallery-navy: #17365d;
  --srl-gallery-gold: #d8a629;
  --srl-gallery-cream: #fbf8f2;
  --srl-gallery-text: #3e4753;

  width: 100%;
  max-width: 1200px;
  margin: 55px auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* =========================================================
   CATEGORY FILTERS
========================================================= */

.srl-gallery-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;

  margin: 0 0 36px;
}

.srl-gallery-filter {
  min-height: 44px;
  padding: 9px 22px;

  border: 1px solid var(--srl-gallery-navy);
  border-radius: 7px;

  color: var(--srl-gallery-navy);
  background: #ffffff;

  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  cursor: pointer;

  transition:
    color 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    transform 0.22s ease;
}

.srl-gallery-filter:hover,
.srl-gallery-filter:focus {
  color: #ffffff;
  background: var(--srl-gallery-gold);
  border-color: var(--srl-gallery-gold);
  transform: translateY(-1px);
}

.srl-gallery-filter.is-active {
  color: #ffffff;
  background: var(--srl-gallery-navy);
  border-color: var(--srl-gallery-navy);
}

/* =========================================================
   ARTWORK CONTACT NOTICE
========================================================= */

.srl-gallery-artwork-notice[hidden] {
  display: none;
}

.srl-gallery-artwork-notice {
  margin: -10px auto 30px;
  padding: 14px 18px;

  border-left: 3px solid var(--srl-gallery-gold);

  color: var(--srl-gallery-text);
  background: rgba(216, 166, 41, 0.08);

  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.55;
  text-align: center;
}

.srl-gallery-artwork-notice a {
  margin-left: 4px;
  color: var(--srl-gallery-navy);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.srl-gallery-artwork-notice a:hover,
.srl-gallery-artwork-notice a:focus {
  color: var(--srl-gallery-gold);
}

/* =========================================================
   FOUR-COLUMN GALLERY
========================================================= */

.srl-gallery-grid {
  display: grid;
  gap: 42px 28px;
  align-items: start;
  justify-items: center;
}

.srl-gallery-columns-1 {
  grid-template-columns: 1fr;
}

.srl-gallery-columns-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.srl-gallery-columns-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.srl-gallery-columns-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.srl-gallery-item {
  width: 267px;
  max-width: 100%;
  min-width: 0;
  justify-self: center;
  opacity: 1;
  transform: translateY(0);

  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.srl-gallery-item.is-hidden {
  display: none;
}

.srl-gallery-open {
  position: relative;

  display: block;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  overflow: hidden;

  border: 0;
  border-radius: 0;

  background: transparent;
  box-shadow: none;

  cursor: pointer;
}

/*
 * WordPress supplies a reduced gallery preview image. Its natural aspect
 * ratio is retained, and the full original opens inside the lightbox.
 */
.srl-gallery-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 0;

  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.srl-gallery-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(11, 35, 61, 0.08);
  opacity: 0;

  transition:
    opacity 0.3s ease,
    background-color 0.3s ease;
}

.srl-gallery-icon {
  width: 52px;
  height: 52px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;

  color: #ffffff;
  background: rgba(23, 54, 93, 0.72);

  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.srl-gallery-open:hover .srl-gallery-image,
.srl-gallery-open:focus .srl-gallery-image {
  transform: scale(1.025);
  filter: brightness(0.89);
}

.srl-gallery-open:hover .srl-gallery-overlay,
.srl-gallery-open:focus .srl-gallery-overlay {
  opacity: 1;
  background: rgba(11, 35, 61, 0.18);
}

.srl-gallery-title {
  margin: 12px 4px 0;

  color: var(--srl-gallery-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.3;
  text-align: center;
}

.srl-gallery-empty {
  padding: 18px;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  background: #ffffff;
}

/* =========================================================
   WHITE LIGHTBOX
========================================================= */

.srl-gallery-lightbox[hidden] {
  display: none;
}

.srl-gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;
  background: #ffffff;
}

.srl-gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #ffffff;
}

.srl-gallery-lightbox-dialog {
  position: relative;
  z-index: 2;

  width: min(1180px, 100%);
  max-height: calc(100vh - 60px);
  overflow: auto;

  border: 0;
  border-radius: 0;

  background: #ffffff;
  box-shadow: none;
}

.srl-gallery-lightbox-stage {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 280px;
  padding: 58px 82px 20px;
  background: #ffffff;
}

.srl-gallery-lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 72vh;
  object-fit: contain;

  border-radius: 0;
  background: #ffffff;
}

/* Close control */

.srl-gallery-lightbox-close {
  position: absolute;
  top: 8px;
  right: 15px;
  z-index: 5;

  width: 48px;
  height: 48px;
  padding: 0;

  border: 0;
  border-radius: 0;

  color: var(--srl-gallery-navy);
  background: transparent;

  font-size: 43px;
  font-weight: 300;
  line-height: 1;

  cursor: pointer;
}

.srl-gallery-lightbox-close:hover,
.srl-gallery-lightbox-close:focus {
  color: var(--srl-gallery-gold);
}

/* Previous and Next controls */

.srl-gallery-lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 4;

  display: inline-flex;
  align-items: center;
  gap: 7px;

  min-height: 46px;
  padding: 10px 13px;

  border: 1px solid var(--srl-gallery-navy);
  border-radius: 0;

  color: var(--srl-gallery-navy);
  background: rgba(255, 255, 255, 0.94);

  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;

  cursor: pointer;
  transform: translateY(-50%);

  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

.srl-gallery-lightbox-prev {
  left: 12px;
}

.srl-gallery-lightbox-next {
  right: 12px;
}

.srl-gallery-lightbox-nav:hover,
.srl-gallery-lightbox-nav:focus {
  color: #ffffff;
  background: var(--srl-gallery-navy);
  border-color: var(--srl-gallery-navy);
}

.srl-gallery-lightbox-nav[disabled] {
  opacity: 0.35;
  cursor: default;
}

.srl-gallery-lightbox-copy {
  padding: 18px 82px 30px;
  background: #ffffff;
  text-align: center;
}

.srl-gallery-lightbox-title {
  margin: 0 0 8px;

  color: var(--srl-gallery-navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 27px;
  line-height: 1.25;
}

.srl-gallery-lightbox-caption {
  margin: 0;

  color: var(--srl-gallery-text);
  font-size: 16px;
  line-height: 1.6;
}

.srl-gallery-lightbox-caption:empty,
.srl-gallery-lightbox-meta:empty,
.srl-gallery-lightbox-title:empty {
  display: none;
}

.srl-gallery-lightbox-meta {
  margin: 10px 0 0;

  color: #6a7078;
  font-size: 14px;
  font-weight: 600;
}

body.srl-gallery-lightbox-open {
  overflow: hidden;
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 980px) {

  .srl-gallery-manager {
    margin-top: 45px;
    margin-bottom: 45px;
  }

  .srl-gallery-columns-3,
  .srl-gallery-columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .srl-gallery-grid {
    gap: 36px 24px;
  }

  .srl-gallery-lightbox-stage {
    padding-left: 68px;
    padding-right: 68px;
  }

  .srl-gallery-lightbox-copy {
    padding-left: 68px;
    padding-right: 68px;
  }

  .srl-gallery-nav-label {
    display: none;
  }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  .srl-gallery-manager {
    margin-top: 38px;
    margin-bottom: 38px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .srl-gallery-filters {
    gap: 8px;
    margin-bottom: 30px;
  }

  .srl-gallery-filter {
    min-height: 41px;
    padding: 8px 14px;
    font-size: 11px;
  }

  .srl-gallery-columns-2,
  .srl-gallery-columns-3,
  .srl-gallery-columns-4 {
    grid-template-columns: 1fr;
  }

  .srl-gallery-grid {
    gap: 34px;
  }

  .srl-gallery-title {
    font-size: 19px;
  }

  .srl-gallery-lightbox {
    padding: 0;
  }

  .srl-gallery-lightbox-dialog {
    width: 100%;
    max-height: 100vh;
  }

  .srl-gallery-lightbox-stage {
    min-height: 230px;
    padding: 56px 46px 12px;
  }

  .srl-gallery-lightbox-image {
    max-height: 68vh;
  }

  .srl-gallery-lightbox-nav {
    width: 40px;
    min-height: 48px;
    padding: 8px;
    justify-content: center;
    font-size: 22px;
  }

  .srl-gallery-lightbox-prev {
    left: 2px;
  }

  .srl-gallery-lightbox-next {
    right: 2px;
  }

  .srl-gallery-lightbox-copy {
    padding: 16px 22px 26px;
  }

  .srl-gallery-lightbox-title {
    font-size: 23px;
  }
}
