/* Loading spinners and states */

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

.loading-container {
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0;
  padding: 0;
}

.loading-container.active {
  display: flex;
}

.spinner {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 4px solid rgba(255, 216, 153, 0.283);
  border-top-color: #ebe2d3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Inline input loading */
.input-group .loading-container {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
}

.input-group .spinner {
  border-width: 3px;
}

/* Stop button inside loading */
.stop-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 24px;
  height: 24px;
  padding: 0;
  color: #ff6666;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.stop-btn:hover {
  color: #ff4d4d;
  background: #fff0f0;
  transform: translate(-50%, -50%) scale(1.1);
}

/* Creating overlay with animated text */
.creating-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  z-index: 20;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  border-radius: inherit;
}

.creating-overlay.show {
  display: flex;
}

.creating-overlay-text {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
  height: 1.5rem;
  width: 100%;
  display: block;
  line-height: 1.5rem;
}

.creating-message-item {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  text-align: center;
  width: 100%;
  line-height: 1.5rem;
}

.creating-message-item-enter {
  opacity: 0;
  transform: translateY(100%);
}

.creating-message-item-active {
  opacity: 1;
  transform: translateY(0);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 1s ease-out 0.15s;
}

.creating-message-item-exit {
  opacity: 0;
  transform: translateY(-40%);
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s;
}

