/* Inline Edit Styles */
.inline-edit {
  position: relative;
  cursor: pointer;
}

.inline-edit__display {
  padding: 0.25rem 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.inline-edit:hover .inline-edit__display {
  background-color: rgb(248 250 252);
  box-shadow: 0 0 0 1px rgb(226 232 240);
}



/* For inline elements (like in metadata section), position the icon differently */
.inline-edit.inline {
  display: inline-block;
  vertical-align: baseline;
}

/* Fix for inline select dropdown */
.inline-edit.inline .inline-edit__edit:not(.hidden) {
  display: inline-block;
}

.inline-edit.inline .inline-edit__select {
  display: inline-block;
  width: auto;
  min-width: 150px;
  vertical-align: baseline;
  font-size: inherit;
  line-height: inherit;
}

.inline-edit__edit {
  position: relative;
}

.inline-edit__input {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 0.2s;
}

.inline-edit__input:focus {
  outline: none;
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.inline-edit__textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 0.2s;
  resize: none;
}

.inline-edit__textarea:focus {
  outline: none;
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.inline-edit__select {
  width: 100%;
  padding: 0.25rem 0.5rem;
  border: 1px solid rgb(203 213 225);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  transition: all 0.2s;
}

.inline-edit__select:focus {
  outline: none;
  border-color: rgb(59 130 246);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.inline-edit__checkbox {
  width: 1rem;
  height: 1rem;
  color: rgb(37 99 235);
  border: 1px solid rgb(203 213 225);
  border-radius: 0.25rem;
}

.inline-edit__checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.inline-edit__loading {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  color: rgb(59 130 246);
  animation: spin 1s linear infinite;
}

.inline-edit--success {
  animation: inline-edit-success 1s ease-in-out;
}

.inline-edit--error {
  animation: inline-edit-error 2s ease-in-out;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes inline-edit-success {
  0%, 100% { background-color: transparent; }
  50% { background-color: rgb(34 197 94 / 0.1); }
}

@keyframes inline-edit-error {
  0%, 100% { background-color: transparent; }
  25%, 75% { background-color: rgb(239 68 68 / 0.1); }
}