.obra-fotos-ajuda {
  display: block;
  margin-top: 7px;
  color: #7a9a7a;
  font-size: 11px;
  line-height: 1.45;
}

.obra-fotos-preview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.obra-fotos-vazio {
  grid-column: 1 / -1;
  padding: 13px;
  border: 1px dashed #2a3a2a;
  border-radius: 6px;
  color: #7a9a7a;
  font-size: 11px;
  text-align: center;
}

.obra-foto-item {
  position: relative;
  overflow: hidden;
  min-width: 0;
  margin: 0;
  border: 1px solid #2a3a2a;
  border-radius: 6px;
  background: #111711;
}

.obra-foto-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.obra-foto-item figcaption {
  padding: 7px 8px;
  color: #b8d5b8;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.obra-foto-remover {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  background: rgba(7, 12, 7, .82);
  color: #fff;
  font: 800 15px/1 Arial, sans-serif;
  cursor: pointer;
}

.oc-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #dfe8df;
}

.oc-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.oc:hover .oc-cover img {
  transform: scale(1.025);
}

.obra-gallery-trigger {
  display: flex;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cfe3cf;
  border-radius: 7px;
  background: #f7fbf7;
  color: #0b7020;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}

.obra-gallery-trigger:hover,
.obra-gallery-trigger:focus-visible {
  border-color: #1a7a1a;
  outline: 2px solid rgba(46, 204, 64, .25);
  outline-offset: 2px;
}

.obra-gallery-trigger:disabled {
  cursor: not-allowed;
  opacity: .62;
}

body.obra-gallery-open {
  overflow: hidden;
}

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

.obra-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 10, 5, .86);
  opacity: 0;
  transition: opacity .18s ease;
}

.obra-gallery-modal.is-open {
  opacity: 1;
}

.obra-gallery-dialog {
  width: min(1040px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  background: #081108;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
}

.obra-gallery-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 14px 12px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  background: #0d2f12;
}

.obra-gallery-title {
  overflow: hidden;
  color: #fff;
  font-family: "Barlow Condensed", sans-serif;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.obra-gallery-counter {
  color: rgba(255, 255, 255, .7);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.obra-gallery-close,
.obra-gallery-nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(0, 0, 0, .48);
  color: #fff;
  cursor: pointer;
}

.obra-gallery-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font: 700 22px/1 Arial, sans-serif;
}

.obra-gallery-stage {
  position: relative;
  display: grid;
  min-height: 320px;
  max-height: 65vh;
  place-items: center;
  background: #020702;
}

.obra-gallery-image {
  display: block;
  width: 100%;
  height: min(65vh, 680px);
  object-fit: contain;
}

.obra-gallery-nav {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 52px;
  border-radius: 6px;
  font: 700 28px/1 Arial, sans-serif;
  transform: translateY(-50%);
}

.obra-gallery-nav[data-gallery-direction="prev"] {
  left: 14px;
}

.obra-gallery-nav[data-gallery-direction="next"] {
  right: 14px;
}

.obra-gallery-nav:disabled {
  display: none;
}

.obra-gallery-close:hover,
.obra-gallery-nav:hover,
.obra-gallery-close:focus-visible,
.obra-gallery-nav:focus-visible {
  border-color: #2ecc40;
  outline: 2px solid rgba(46, 204, 64, .35);
  outline-offset: 2px;
}

.obra-gallery-thumbs {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 12px 14px;
  background: #0b160c;
  scrollbar-color: #2d6635 #0b160c;
}

.obra-gallery-thumb {
  flex: 0 0 88px;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 5px;
  background: #152217;
  cursor: pointer;
}

.obra-gallery-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.obra-gallery-thumb.is-active {
  border-color: #f5c518;
}

@media (max-width: 600px) {
  .obra-fotos-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .obra-gallery-modal {
    align-items: center;
    padding: 8px;
  }

  .obra-gallery-dialog {
    width: 100%;
    max-height: calc(100dvh - 16px);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
  }

  .obra-gallery-head {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 60px;
    padding-left: 14px;
  }

  .obra-gallery-title {
    font-size: 17px;
  }

  .obra-gallery-counter {
    grid-column: 1;
    grid-row: 2;
  }

  .obra-gallery-close {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .obra-gallery-stage {
    min-height: 0;
    height: auto;
    max-height: calc(100dvh - 170px);
    aspect-ratio: 4 / 3;
  }

  .obra-gallery-image {
    height: 100%;
  }

  .obra-gallery-nav {
    width: 42px;
    height: 48px;
  }

  .obra-gallery-nav[data-gallery-direction="prev"] {
    left: 8px;
  }

  .obra-gallery-nav[data-gallery-direction="next"] {
    right: 8px;
  }

  .obra-gallery-thumbs {
    min-height: 86px;
    padding: 9px;
  }

  .obra-gallery-thumb {
    flex-basis: 76px;
  }
}
