.admin-gallery-widget {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(20, 28, 45, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.admin-gallery-preview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  min-height: 108px;
}

.admin-gallery-preview span {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 108px;
  border: 1px dashed rgba(20, 28, 45, 0.2);
  border-radius: 8px;
  color: #64748b;
  font-weight: 800;
}

.admin-gallery-preview figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(20, 28, 45, 0.12);
  border-radius: 8px;
  background: #ffffff;
  aspect-ratio: 1 / 1;
}

.admin-gallery-preview img,
.public-media-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-gallery-preview button {
  position: absolute;
  right: 6px;
  bottom: 6px;
  border: 0;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(17, 24, 39, 0.86);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.admin-gallery-widget .admin-upload-picker {
  width: fit-content;
}

.admin-gallery-widget small {
  color: #526070;
  line-height: 1.5;
}

.content-image-uploader {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(20, 28, 45, 0.14);
  border-radius: 12px;
  background: #f8fafc;
}

.content-image-uploader .content-image-url {
  display: grid;
  gap: 7px;
}

.content-image-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.content-image-picker {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px dashed rgba(8, 104, 83, 0.48);
  border-radius: 9px;
  color: #086853;
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.content-image-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.content-image-picker:focus-within {
  outline: 3px solid rgba(8, 104, 83, 0.2);
  outline-offset: 2px;
}

.content-image-preview {
  width: min(100%, 420px);
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(20, 28, 45, 0.12);
  border-radius: 10px;
  background: #e2e8f0;
}

.content-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.public-media-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 6px 0 18px;
}

.public-media-gallery img {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #e2e8f0;
}

.ops-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.ops-detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(20, 28, 45, 0.1);
  padding-top: 8px;
}

.ops-detail-list dt {
  color: #64748b;
  font-weight: 800;
}

.ops-detail-list dd {
  margin: 0;
  color: #111827;
  text-align: right;
}

@media (max-width: 980px) {
  .admin-gallery-preview,
  .public-media-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-gallery-widget .secondary-cta,
  .admin-gallery-widget .admin-upload-picker {
    width: 100%;
    justify-content: center;
  }

  .content-image-actions,
  .content-image-actions .secondary-cta,
  .content-image-picker {
    width: 100%;
  }

  .ops-detail-list div {
    display: grid;
  }

  .ops-detail-list dd {
    text-align: left;
    word-break: break-word;
  }
}
