/* notifybox.css - NotifyBox 通知彈窗套件樣式 */

/* 基礎彈窗樣式 */
.notifybox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

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

.notifybox-container {
  background: white;
  border-radius: 16px;
  padding: 0;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.8) translateY(20px);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notifybox-overlay.show .notifybox-container {
  transform: scale(1) translateY(0);
}

/* 彈窗標題區 */
.notifybox-header {
  padding: 1.5rem 1.5rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  position: relative;
  text-align: center;
}

.notifybox-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
}

.notifybox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.notifybox-close:hover {
  background: #f0f0f0;
  color: #333;
}

/* 彈窗內容區 */
.notifybox-body {
  padding: 1rem 1.5rem 1.5rem;
  text-align: center;
}

.notifybox-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 28px;
  font-weight: bold;
}

.notifybox-icon.success {
  background: linear-gradient(135deg, #2ed573 0%, #1e90ff 100%);
  color: white;
}

.notifybox-icon.error {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
  color: white;
}

.notifybox-icon.warning {
  background: linear-gradient(135deg, #ffa726 0%, #ff7043 100%);
  color: white;
}

.notifybox-icon.info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.notifybox-content {
  color: #666;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
}

/* 輸入框 */
.notifybox-input-container {
  margin: 1rem 0;
}

.notifybox-input-field {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
  box-sizing: border-box;
}

.notifybox-input-field:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 按鈕區域 */
.notifybox-footer {
  padding: 0 1.5rem 1.5rem;
  display: flex;
  gap: 12px;
  justify-content: center;
}

.notifybox-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
  min-width: 80px;
}

.notifybox-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.notifybox-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.notifybox-btn-secondary {
  background: #f8f9fa;
  color: #666;
  border: 1px solid #e1e5e9;
}

.notifybox-btn-secondary:hover {
  background: #e9ecef;
}

/* 載入中彈窗 */
.notifybox-loading-modal {
  background: rgba(0, 0, 0, 0.8);
}

.notifybox-loading-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  max-width: 300px;
}

.notifybox-loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: notifybox-spin 1s linear infinite;
  margin: 0 auto 1rem;
}

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

.notifybox-loading-text {
  color: #666;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
}

/* Toast 通知 */
.notifybox-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.notifybox-toast {
  background: white;
  color: #333;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  transform: translateX(100%);
  transition: all 0.3s ease;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto",
    sans-serif;
}

.notifybox-toast.show {
  transform: translateX(0);
}

.notifybox-toast.success {
  border-left: 4px solid #28a745;
}

.notifybox-toast.error {
  border-left: 4px solid #dc3545;
}

.notifybox-toast.warning {
  border-left: 4px solid #ffc107;
}

.notifybox-toast.info {
  border-left: 4px solid #17a2b8;
}

.notifybox-toast-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.notifybox-toast.success .notifybox-toast-icon {
  background: #28a745;
}

.notifybox-toast.error .notifybox-toast-icon {
  background: #dc3545;
}

.notifybox-toast.warning .notifybox-toast-icon {
  background: #ffc107;
}

.notifybox-toast.info .notifybox-toast-icon {
  background: #17a2b8;
}

.notifybox-toast-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 16px;
}

/* 圖片預覽 */
.notifybox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

/* 動畫效果 */
.notifybox-container.shake {
  animation: notifybox-shake 0.5s ease-in-out;
}

@keyframes notifybox-shake {
  0%,
  100% {
    transform: scale(1) translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: scale(1) translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: scale(1) translateX(5px);
  }
}

/* 響應式設計 */
@media (max-width: 480px) {
  .notifybox-container {
    width: 95%;
    margin: 1rem;
  }

  .notifybox-footer {
    flex-direction: column;
  }

  .notifybox-btn {
    width: 100%;
  }

  .notifybox-toast-container {
    left: 10px;
    right: 10px;
  }

  .notifybox-toast {
    min-width: auto;
  }
}
