/* Shared generic editor-form styling — used by every add/edit page (Wellness Content, Bedtime
 * Stories, Narration Voices, and future modules). Extracted out of wellness-content.css so
 * Bedtime Stories doesn't duplicate it. */

.editor-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.editor-grid .field-full {
  grid-column: 1 / -1;
}

@media (max-width: 700px) {
  .editor-grid {
    grid-template-columns: 1fr;
  }
}

.field-hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.image-upload {
  display: flex;
  align-items: center;
  gap: 14px;
}

.image-upload-preview {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: none;
  color: var(--text-muted);
  font-size: 11px;
  text-align: center;
}

.image-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex: none;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-track {
  position: absolute;
  inset: 0;
  background: var(--border-strong);
  border-radius: 999px;
  transition: background var(--dur-fast) var(--ease);
  cursor: pointer;
}

.switch-track::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--dur-fast) var(--ease);
}

.switch input:checked + .switch-track {
  background: var(--accent);
}

.switch input:checked + .switch-track::before {
  transform: translateX(18px);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.editor-message {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.editor-message.error {
  color: var(--danger);
  background: var(--danger-soft);
}
