.scg-root {
  margin: 1rem 0;
}

.scg-status {
  margin-bottom: 1rem;
}

.scg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  transition: all 0.3s ease;
}

.scg-item {
  border: 1px solid #ddd;
  padding: 0;
  /* Remove padding to let image fill width */
  background: #fff;
  border-radius: 6px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.scg-image-wrap {
  cursor: pointer;
  width: 100%;
  display: block;
}

.scg-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.scg-image-wrap:hover img {
  transform: scale(1.02);
}

.scg-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  /* Add padding to the check area instead of item */
}

.scg-actions {
  margin-top: 1rem;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.scg-btn {
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  border-radius: 6px;
}

.scg-btn[disabled] {
  opacity: .5;
  cursor: not-allowed;
}

.scg-note {
  font-size: .95rem;
  opacity: .9;
}

.scg-login-wrap {
  border: 1px solid #ddd;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 8px;
  max-width: 400px;
  margin: 0 auto;
}

.scg-login-wrap h3 {
  margin-top: 0;
}

.scg-register-link {
  margin-top: 15px;
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 10px;
}

/* Forms & Notices */
.scg-register-form-wrap {
  max-width: 500px;
  margin: 20px auto;
  padding: 30px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.scg-form-row {
  margin-bottom: 20px;
}

.scg-form-row label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #444;
}

.scg-form-row input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
}

.scg-form-row button {
  width: 100%;
  justify-content: center;
}

.scg-notice {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.scg-notice-success {
  background: #edfaf2;
  color: #155724;
  border-left: 4px solid #28a745;
}

.scg-notice-error {
  background: #fff5f5;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

.scg-status-warning {
  background: #fff8e1;
  color: #856404;
  padding: 10px;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
  font-weight: 600;
}

/* Gallery Types */
.scg-gallery-masonry {
  display: block !important;
  column-gap: 12px;
}

.scg-gallery-masonry .scg-item {
  display: inline-block;
  width: 100%;
  break-inside: avoid;
  margin-bottom: 12px;
}

.scg-gallery-carousel {
  display: flex !important;
  overflow-x: auto;
  gap: 12px;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.scg-gallery-carousel .scg-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.scg-gallery-list .scg-item {
  display: flex;
  gap: 20px;
  align-items: center;
}

.scg-gallery-list .scg-item img {
  max-width: 250px;
}

/* Responsive */
@media (max-width: 768px) {
  .scg-gallery-masonry {
    column-count: 2 !important;
  }
}


.scg-lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.scg-lightbox-backdrop[aria-hidden="false"] {
  display: flex;
}

.scg-lightbox {
  background: #fff;
  max-width: min(920px, 92vw);
  max-height: 92vh;
  border-radius: 10px;
  overflow: hidden;
  outline: none;
  display: flex;
  flex-direction: column;
}

.scg-lightbox header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid #eee;
}

.scg-lightbox .scg-lightbox-body {
  padding: 12px;
  overflow: auto;
}

.scg-lightbox img {
  width: 100%;
  height: auto;
  display: block;
}

.scg-icon {
  font-size: 0.95rem;
}