/* Spinner Button Styles */
.atom-apply-button {
  position: relative;
  transition: opacity 0.2s;
  /* Remove background-color transition */
  overflow: hidden;
  min-width: 100px;
  background-color: var(--atom-apply-button-color, #2b5787);
  /* Ensure consistent width */
}

.atom-apply-button .button-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  transition: opacity 0.9s;
}

.atom-apply-button .spinner-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.9s;
  pointer-events: none;
  /* Allow clicks to pass through */
  /* Use rgba with transparent background to preserve original button color */
  /*background: rgba(0, 0, 0, 0);*/
}

.atom-apply-button.loading .button-content {
  opacity: 0;
}

.atom-apply-button.loading .spinner-container {
  opacity: 1;
}

/* Spinner Animation */
.atom-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid white;  
  animation: atom-spin 1s linear infinite;
}

@keyframes atom-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}