.gallery-field__label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.gallery-field__required {
  color: #ef4444;
  margin-left: 0.25rem;
}

.gallery-field__help {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.gallery-field__container {
  border: 2px dashed #d1d5db;
  border-radius: 0.375rem;
  padding: 1rem;
}

.gallery-field__container--error {
  border-color: #ef4444;
}

.gallery-field__preview {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gallery-field__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .gallery-field__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 768px) {
  .gallery-field__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-field__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.gallery-field__item {
  position: relative;
  cursor: move;
  border-radius: 0.375rem;
  overflow: hidden;
  border: 2px solid #e5e7eb;
  transition: opacity 0.15s;
}

.gallery-field__item:hover {
  border-color: #93c5fd;
}

.gallery-field__item--dragging {
  opacity: 0.5;
  border-color: #3b82f6;
}

.gallery-field__image-wrapper {
  aspect-ratio: 1;
  background-color: #f3f4f6;
}

.gallery-field__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-field__drag-handle {
  position: absolute;
  top: 0.25rem;
  left: 0.25rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0.25rem 0.375rem;
  border-radius: 0.25rem;
}

.gallery-field__drag-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.gallery-field__remove {
  position: absolute;
  top: 0.25rem;
  right: 0.25rem;
  background-color: #dc2626;
  color: white;
  padding: 0.375rem;
  border-radius: 0.25rem;
  opacity: 0;
  transition: opacity 0.15s, background-color 0.15s;
  border: none;
  cursor: pointer;
}

.gallery-field__item:hover .gallery-field__remove {
  opacity: 1;
}

.gallery-field__remove:hover {
  background-color: #b91c1c;
}

.gallery-field__remove-icon {
  width: 1rem;
  height: 1rem;
}

.gallery-field__order {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.gallery-field__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.5rem;
  border-top: 1px solid #e5e7eb;
}

.gallery-field__count {
  font-size: 0.875rem;
  color: #4b5563;
}

.gallery-field__actions {
  display: flex;
  gap: 0.5rem;
}

.gallery-field__button {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  border: 1px solid;
  cursor: pointer;
  transition: background-color 0.15s;
}

.gallery-field__button--edit,
.gallery-field__button--add {
  background-color: #2563eb;
  color: white;
  border-color: #2563eb;
}

.gallery-field__button--edit:hover,
.gallery-field__button--add:hover {
  background-color: #1d4ed8;
}

.gallery-field__button--clear {
  background-color: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.gallery-field__button--clear:hover {
  background-color: #fee2e2;
}

.gallery-field__hint {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
}

.gallery-field__empty {
  text-align: center;
  padding: 2rem 0;
}

.gallery-field__empty-icon {
  margin: 0 auto;
  height: 3rem;
  width: 3rem;
  color: #9ca3af;
}

.gallery-field__empty-description {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
}

.gallery-field__empty-max {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.gallery-field__error {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #dc2626;
}

.gallery-field__display {
  color: #1d2327;
}

.gallery-field__display--empty {
  color: #9ca3af;
  font-style: italic;
}
