/**
 * 公開側: 送信中・保存中・アップロード中 UI
 */

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

/* --- 画面オーバーレイ --- */
.ev-async-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ev-async-overlay--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.ev-async-overlay-open {
  overflow: hidden;
}

.ev-async-overlay__panel {
  width: min(100%, 360px);
  padding: 28px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  text-align: center;
}

.ev-async-overlay__spinner,
.ev-async-btn__spinner,
.ev-async-section-status__spinner,
.ev-async-loading-block__spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  border: 3px solid rgba(29, 78, 216, 0.2);
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: ev-async-spin 0.75s linear infinite;
}

.ev-async-overlay__message {
  margin: 16px 0 0;
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.5;
}

.ev-async-overlay__hint {
  margin: 8px 0 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.6;
}

/* --- ボタン内スピナー --- */
.ev-async-btn--loading {
  position: relative;
  pointer-events: none;
  opacity: 0.88;
}

.ev-async-btn__spinner {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border-width: 2px;
}

.ev-async-btn__label {
  vertical-align: middle;
}

/* --- セクション内ステータス --- */
.ev-async-section-status {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ev-async-section-status--visible {
  display: flex;
}

.ev-async-section-status__spinner {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-width: 2px;
}

.ev-async-section--busy .payment-attachment-input,
.ev-async-section--busy .order-attachment-target-select,
.ev-async-section--busy .order-attachment-apply-all-label input {
  pointer-events: none;
  opacity: 0.55;
}

/* --- インラインローディングブロック（決済準備など） --- */
.ev-async-loading-block__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.ev-async-loading-block__message {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.5;
}

.ev-async-loading-block__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.6;
  max-width: 420px;
}
