.gallery-hero {
  background: #eaf0f7;
}

.gallery-section {
  background: #fff;
  min-height: 360px;
}

.gallery-masonry {
  columns: 4 220px;
  column-gap: 20px;
}

.gallery-photo {
  break-inside: avoid;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(20, 43, 74, .08);
  margin: 0 0 20px;
  overflow: hidden;
  position: relative;
}

.gallery-photo img {
  background: #eaf0f7;
  border-radius: inherit;
  display: block;
  cursor: zoom-in;
  height: auto;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform .35s ease;
  width: 100%;
}

.gallery-photo:hover img {
  transform: scale(1.025);
}

.gallery-photo-menu-trigger {
  align-items: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(20, 43, 74, .38);
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(10, 28, 51, .18);
  color: #fff;
  cursor: pointer;
  display: grid;
  height: 38px;
  opacity: 0;
  padding: 0;
  pointer-events: none;
  place-items: center;
  position: absolute;
  right: 10px;
  top: 10px;
  transform: translateY(-4px);
  transition: background-color .18s ease, opacity .18s ease, transform .18s ease;
  width: 38px;
  z-index: 3;
}

.gallery-photo-menu-trigger:hover,
.gallery-photo-menu-trigger[aria-expanded="true"] {
  background: rgba(20, 43, 74, .58);
}

.gallery-photo:hover .gallery-photo-menu-trigger,
.gallery-photo:focus-within .gallery-photo-menu-trigger {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.gallery-photo-menu-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.gallery-photo-menu-trigger-dots {
  background: currentColor;
  border-radius: 50%;
  height: 4px;
  position: relative;
  width: 4px;
}

.gallery-photo-menu-trigger-dots::before,
.gallery-photo-menu-trigger-dots::after {
  background: currentColor;
  border-radius: inherit;
  content: "";
  height: inherit;
  position: absolute;
  top: 0;
  width: inherit;
}

.gallery-photo-menu-trigger-dots::before {
  left: -7px;
}

.gallery-photo-menu-trigger-dots::after {
  right: -7px;
}

.gallery-photo.is-actions-open {
  background: #142b4a;
}

.gallery-photo.is-actions-open .gallery-photo-menu-trigger {
  display: none;
}

.gallery-photo.is-actions-open img {
  box-shadow: inset 0 0 0 4px #fff, 0 10px 26px rgba(10, 28, 51, .28);
  transform: scale(.9);
}

.gallery-empty {
  background: #eaf0f7;
  column-span: all;
  color: #64738a;
  margin: 0;
  padding: 42px 28px;
  text-align: center;
}

.gallery-photo-menu {
  align-items: center;
  background: rgba(10, 28, 51, .42);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 10px;
  inset: 0;
  justify-content: center;
  padding: 12px 10px;
  position: absolute;
  z-index: 2;
}

.gallery-photo-menu[hidden] {
  display: none;
}

.gallery-photo-menu-button {
  align-items: center;
  background: #f3c94f;
  border: 1px solid #f3c94f;
  border-radius: 99px;
  box-sizing: border-box;
  box-shadow: 0 8px 24px rgba(10, 28, 51, .3);
  color: #142b4a;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  gap: 9px;
  justify-content: center;
  max-width: 170px;
  min-height: 42px;
  min-width: 0;
  padding: 0 16px;
  width: 100%;
  pointer-events: auto;
}

.gallery-photo-menu-button + .gallery-photo-menu-button {
  background: rgba(20, 43, 74, .96);
  border-color: #f3c94f;
  color: #fff;
}

.gallery-photo-action-icon {
  font-size: 16px;
  line-height: 1;
}

.gallery-photo-menu-button:hover,
.gallery-photo-menu-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, .85);
  outline-offset: 2px;
}

.gallery-photo-action-status {
  background: #eaf0f7;
  border-left: 3px solid #f3c94f;
  color: #142b4a;
  margin: 18px 0 0;
  padding: 12px 16px;
}

.gallery-photo-copy-field {
  height: 1px;
  left: -9999px;
  opacity: 0;
  position: fixed;
  width: 1px;
}

.gallery-lightbox {
  align-items: center;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, .32);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 10000;
}

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

.has-gallery-lightbox {
  overflow: hidden;
}

.gallery-lightbox-image {
  max-height: 94vh;
  max-height: 94dvh;
  max-width: 96vw;
  object-fit: contain;
}

.gallery-lightbox-close {
  align-items: center;
  background: #f3c94f;
  border: 0;
  border-radius: 50%;
  color: #142b4a;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 30px;
  height: 48px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: max(16px, env(safe-area-inset-right));
  top: max(16px, env(safe-area-inset-top));
  width: 48px;
}

.gallery-lightbox-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.gallery-load-more {
  display: flex;
  margin: 24px auto 0;
}

.gallery-load-more[hidden] {
  display: none;
}

.admin-gallery-list-section #admin-gallery-list {
  background: #fff;
  box-shadow: 0 12px 40px rgba(20, 43, 74, .05);
  padding: 0 24px;
}

.admin-header-actions {
  flex-wrap: wrap;
  gap: 12px;
}

.admin-gallery-photo {
  gap: 18px;
}

.admin-gallery-photo img {
  background: #eaf0f7;
  flex: 0 0 96px;
  height: 72px;
  object-fit: cover;
  width: 96px;
}

.admin-gallery-photo > div {
  flex: 1;
}

.gallery-management-layout {
  margin-bottom: 28px;
}

@media (max-width: 800px) {
  .gallery-masonry {
    columns: 2;
    column-gap: 12px;
  }

  .gallery-photo {
    margin-bottom: 12px;
  }

  .admin-gallery-photo {
    gap: 12px;
  }

  .admin-gallery-photo img {
    flex-basis: 76px;
    height: 58px;
    width: 76px;
  }
}

@media (hover: none) {
  .gallery-photo-menu-trigger {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #111;
    height: 30px;
    margin: 2px 4px 0 auto;
    opacity: 1;
    pointer-events: auto;
    position: relative;
    right: auto;
    top: auto;
    transform: none;
    transition: none;
    width: 36px;
    z-index: 3;
  }

  .gallery-photo-menu-trigger:hover,
  .gallery-photo-menu-trigger[aria-expanded="true"] {
    background: transparent;
  }

  .gallery-photo-menu-trigger:focus-visible {
    outline-color: #142b4a;
  }

  .gallery-photo.is-actions-open .gallery-photo-menu-trigger {
    display: grid;
    opacity: 1;
    pointer-events: auto;
    z-index: 4;
  }
}

@media (max-width: 480px) {
  .gallery-photo-menu {
    gap: 8px;
    padding: 10px 8px;
  }

  .gallery-photo-menu-button {
    font-size: 11px;
    min-height: 38px;
    padding: 0 8px;
  }

  .gallery-photo-action-icon {
    display: none;
  }
}
