.sgg-wrap {
  --sgg-accent: #0087f7;
  --sgg-radius: 10px;
  --sgg-gap: 12px;
}

.sgg-notice {
  padding: 14px 18px;
  border-radius: var(--sgg-radius);
  background: #f3f6fa;
  border-left: 4px solid var(--sgg-accent);
  margin: 0 0 24px;
}

/* Upload dropzone */
.sgg-dropzone {
  border: 2px dashed var(--sgg-accent);
  border-radius: var(--sgg-radius);
  background: #f7fbff;
  padding: 32px 20px;
  margin-bottom: 24px;
  text-align: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.sgg-dropzone:hover,
.sgg-dropzone.dz-drag-hover {
  background: #e8f3ff;
  border-style: solid;
}
.sgg-dropzone .dz-message {
  font-size: 1.05em;
  color: #333;
}
.sgg-dropzone .dz-message small {
  display: block;
  margin-top: 6px;
  color: #777;
}

/* Just-uploaded previews */
.sgg-uploaded {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sgg-gap);
  margin-bottom: 16px;
}
.sgg-upload-item {
  position: relative;
  width: 140px;
  padding: 8px;
  background: #fff;
  border: 1px solid #e2e6ea;
  border-radius: var(--sgg-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.sgg-upload-item img {
  display: block;
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 6px;
}
.sgg-upload-item .sgg-caption {
  width: 100%;
  box-sizing: border-box;
  font-size: 13px;
}
.sgg-delete {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  line-height: 22px;
  text-align: center;
  border: 0;
  border-radius: 50%;
  background: #c62828;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}
.sgg-delete:hover { background: #8e0000; }

.sgg-save {
  display: none;
  margin-bottom: 28px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--sgg-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
.sgg-save:hover { filter: brightness(.92); }
.sgg-save[disabled] { opacity: .6; cursor: wait; }

.sgg-status {
  margin: 0 0 20px;
  font-size: 14px;
}
.sgg-status.is-error { color: #c62828; }
.sgg-status.is-ok { color: #2e7d32; }

/* Approved gallery grid */
.sgg-gallery {
  display: grid;
  grid-template-columns: repeat(var(--sgg-cols, 3), 1fr);
  gap: var(--sgg-gap);
  margin-bottom: 30px;
}
.sgg-item {
  margin: 0;
  overflow: hidden;
  border-radius: var(--sgg-radius);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
}
.sgg-item a {
  display: block;
  overflow: hidden;
}
.sgg-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s;
}
.sgg-item a:hover img { transform: scale(1.04); }
.sgg-video {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: #1c1c1c;
  color: #fff;
  font-size: 1.1em;
}
.sgg-caption-text {
  margin: 0;
  padding: 8px 10px;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 782px) {
  .sgg-gallery { grid-template-columns: repeat(min(var(--sgg-cols, 3), 2), 1fr); }
}
@media (max-width: 480px) {
  .sgg-gallery { grid-template-columns: 1fr; }
  .sgg-upload-item { width: calc(50% - 6px); }
}
