.button-style {
  appearance: none;
  display: flex;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--text-color);
  font-size: 0.75rem;
  border-radius: 4px;
  justify-content: center;
  border-width: 2px;
  border-style: outset;
  border-color: buttonborder;
  text-align: center;
}

.bg-preview {
  margin-top: 0.5rem;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  opacity: 0.9;
}

#settingsForm {
  background-color: transparent;
}

#saveStatus {
  text-align: center;
  margin-top: 1rem;
  font-weight: bold;
}

.preview-wrapper {
  position: relative;
  margin-top: 0.5rem;
}

.bg-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 0.5rem;
  border: 1px solid #ccc;
  opacity: 0.9;
  overflow: hidden;
  cursor: pointer;
}

.bg-preview.dragover {
  outline: 3px dashed #fff;
  outline-offset: -5px;
  background-color: rgba(255, 255, 255, 0.1);
}

.drop-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.3rem 0.6rem;
  border-radius: 0.3rem;
  pointer-events: none;
  transition: opacity 0.2s ease;
  opacity: 1;
}

.bg-preview.has-image .drop-label {
  opacity: 0;
}

.remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.25rem 0.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 0.5rem;
  z-index: 2;
}

.preview-wrapper:hover .remove-btn {
  opacity: 1;
}
.bg-preview.has-image .drop-label {
  opacity: 0;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  overflow: hidden;
  z-index: 1;
  display: none;
}

.progress-bar .bar-fill {
  height: 100%;
  width: 0%;
  background: white;
  transition: width 0.2s ease;
}

html.edit-mode,
body.edit-mode {
  background: rgba(0, 0, 0, 0.5);
  min-height: 100%;
  height: auto;
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: white; /* Optional: force light text */
}
#cssInput {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem;
  font-family: monospace;
  font-size: 0.9rem;
  color: white;
  background-color: rgba(20, 20, 20, 0.9);
  border: 1px solid #555;
  border-radius: 0.5rem;
  resize: vertical;
  box-shadow: inset 0 0 4px rgba(255, 255, 255, 0.1);
}
#editorHeader {
  text-align: center;
}
body.edit-mode h3 {
  font-size: 1.5rem;
  text-align: center;
}

.add-tag-button {
  width: 100px;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
  font-size: 0.9rem;
}
input[type="color"]::-webkit-color-swatch {
  border-radius: 4px;
  transform: scale(5); /* make the swatch bigger */
  transform-origin: center;
}
input[type="color"]::-moz-color-swatch {
  transform: scale(5);
  transform-origin: center;
}
input.tag-name {
  flex: 1;
  align-self: center;
  margin-bottom: 0;
}

/* Glow on hover */
.tag-row:hover {
  background-color: rgba(255, 255, 255, 0.1);
  transition: box-shadow 0.2s ease;
}

/* Highlight selected tag row */
.tag-row.selected {
  background-color: rgba(255, 255, 255, 0.2);
}

.editor-section {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(6px);
}

.palette-picker {
  background-color: rgba(20, 20, 20, 0.9);
  padding: 1rem;
  border-radius: 1rem;
}
