/**
 * ローディング関連のCSS
 * ボタン、フォーム、スピナーのローディング状態を管理
 */

/* ローディングボタン */
.loading-button {
  position: relative;
  overflow: hidden;
}

.loading-button .btn-text {
  display: inline-block;
  transition: opacity 0.3s ease;
}

.loading-button .loading-content {
  display: none;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: inherit;
  color: inherit;
}

.loading-button.loading .btn-text {
  opacity: 0;
}

.loading-button.loading .loading-content {
  display: flex;
}

/* ローディングスピナー */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

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

/* フォームローディングオーバーレイ */
.form-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.form-loading-overlay.show {
  opacity: 1;
  visibility: visible;
}

.form-loading-spinner {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
