/* 共用背景：半透明變暗 */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* 變暗效果 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* 內容盒子的基本樣式 */
.modal-box {
  background: white;
  border-radius: 8px;
  position: relative;
  padding: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 右上角關閉按鈕 (X) */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  color: #666;
}

.agreement-box {
  width: 90vw;   /* 寬度佔 90% */
  height: 80vh;  /* 高度佔 80% */
  display: flex;
  flex-direction: column;
}

.agreement-content {
  overflow-y: auto; /* 內容過長時顯示捲軸 */
  flex-grow: 1;
  margin-top: 15px;
}

.alert-box {
  min-width: 300px;
  max-width: 450px;
  text-align: center;
}

.loading-overlay {
  cursor: wait; /* 顯示等待圖示 */
}

.loading-spinner {
  /* 簡單的旋轉動畫或文字 */
  color: white;
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 旋轉動畫定義 */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 預設隱藏所有 overlay */
.overlay {
  display: none; /* 初始狀態隱藏 */
}

/* 當 overlay 有 .active 時才顯示 */
.overlay.active {
  display: flex;
}
