/**
 * 共用樣式
 */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', sans-serif;
  margin: 0;
  padding: 0;
  font-size: 16px; /* 預設字體大小 */
}

/* 響應式設計 */
@media (max-width: 768px) {
  body {
    font-size: 16px; /* 手機版也使用較大字體 */
  }
}

/* 按鈕樣式 */
.btn {
  min-height: 44px;
  font-size: 16px;
}

@media (min-width: 1024px) {
  .btn {
    min-height: 38px;
    font-size: 16px; /* 保持較大字體 */
  }
}

/* 輸入框樣式 */
.form-control {
  min-height: 44px;
  font-size: 16px;
}

@media (min-width: 1024px) {
  .form-control {
    min-height: 38px;
    font-size: 16px; /* 保持較大字體 */
  }
}

/* 金額顯示 */
.amount-display {
  font-size: 24px;
  font-weight: bold;
  color: var(--dark-color);
}

@media (min-width: 1024px) {
  .amount-display {
    font-size: 28px;
  }
}

/* 返回頂端按鈕 */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.back-to-top:hover {
  background-color: #0b5ed7;
}

.back-to-top.show {
  display: flex;
}

/* 載入動畫 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 新增/編輯會員模態：拉寬、緊湊高度，小螢幕不需滾動（會員管理與收件頁共用） */
.modal-dialog-customer {
  max-width: 560px;
}
@media (min-width: 576px) {
  .modal-dialog-customer {
    max-width: 640px;
  }
}
.modal-body-customer .form-label {
  margin-bottom: 0.15rem;
}
.modal-body-customer .form-control-sm {
  min-height: 31px;
}

.bg-orange {
  background-color: #fd7e14 !important;
}
