* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Marker Felt", cursive,
    sans-serif;
  color: black;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: white;
}

header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}

.logo a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 1rem;
}

section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

#uploadButton {
  padding: 5px;
  border: 2px solid black;
  box-shadow: 4px 4px 5px grey;
  background-color: white;
  cursor: pointer;
}

#uploadButton:hover {
  background-color: #f0f0f0;
}

#uploadButton:active {
  transform: scale(0.95);
}

#imageInput {
  display: none;
}

#imageList {
  display: none;
  padding: 0.5rem;
  background-color: lightgray;
  border-radius: 6px;

  max-width: 25rem;
  max-height: 25rem;
  overflow-y: auto;
}

#imageList.show {
  display: block;
}

.image-item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;

  padding: 0.8rem;
  margin: 0.5rem;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  cursor: grab;
  user-select: none;

  max-width: 25rem;
}

.image-item-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deleteButton {
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1rem;
  color: #888;
  padding: 0 0.25rem;
}

.deleteButton:hover {
  color: #c00;
}

.image-item:hover {
  border-color: #888;
}

.image-item.sortable-chosen {
  cursor: grabbing;
}

.image-item.sortable-ghost {
  opacity: 0.4;
  background-color: #e8e8e8;
}

body.dragging,
body.dragging * {
  cursor: grabbing !important;
}

.actions {
  display: none;
  flex-direction: row;
  gap: 0.75rem;
}

.actions.show {
  display: flex;
}

#clearButton,
#generateButton {
  padding: 5px;
  border: 2px solid black;
  box-shadow: 4px 4px 5px grey;
  background-color: white;
  cursor: pointer;
}

#clearButton:hover:not(:disabled),
#generateButton:hover:not(:disabled) {
  background-color: #f0f0f0;
}

#clearButton:active:not(:disabled),
#generateButton:active:not(:disabled) {
  transform: scale(0.95);
}

#clearButton:disabled,
#generateButton:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.hint {
  font-size: 0.85rem;
  color: #555;
}

#status {
  font-size: 0.9rem;
  text-align: center;
}

#status:empty {
  display: none;
}

#status.error {
  color: #b00;
}

.thumbnail {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  background-color: #eee;
}

body.drop-target {
  outline: 4px dashed #888;
  outline-offset: -12px;
}

footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  text-align: center;
}
