/* 鲸鱼卖家魔方 - 组件样式文件 */

/* 加载状态组件 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(30, 58, 138, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid var(--accent-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 模态框组件 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  transform: scale(0.7);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* 表单组件 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-control.error {
  border-color: #ef4444;
}

.form-control.success {
  border-color: #10b981;
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-error.show {
  display: block;
}

/* 文件上传组件 */
.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
  background: var(--bg-light);
  transition: all 0.3s ease;
  cursor: pointer;
}

.file-upload:hover,
.file-upload.dragover {
  border-color: var(--secondary-color);
  background: rgba(59, 130, 246, 0.05);
}

.file-upload-icon {
  font-size: 2rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.file-upload-text {
  color: var(--text-dark);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.file-upload-hint {
  color: var(--text-light);
  font-size: 0.875rem;
}

.file-upload input[type="file"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* 进度条组件 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
  transition: width 0.3s ease;
  width: 0%;
}

/* 标签组件 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-light);
  color: var(--text-dark);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0.25rem;
  border: 1px solid var(--border-color);
}

.tag.primary {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.tag.secondary {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.tag.accent {
  background: var(--accent-color);
  color: var(--white);
  border-color: var(--accent-color);
}

/* 提示框组件 */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-success {
  background: #f0fdf4;
  border-color: #10b981;
  color: #065f46;
}

.alert-warning {
  background: #fffbeb;
  border-color: var(--accent-color);
  color: #92400e;
}

.alert-error {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  border-color: var(--secondary-color);
  color: #1e40af;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* 卡片组件 */
.card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-light);
}

/* 步骤组件 */
.steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2rem 0;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  background: var(--white);
  padding: 0 1rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: var(--secondary-color);
  color: var(--white);
}

.step.completed .step-number {
  background: #10b981;
  color: var(--white);
}

.step-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-dark);
  text-align: center;
}

/* 搜索组件 */
.search-box {
  position: relative;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 12px 50px 12px 16px;
  border: 2px solid var(--border-color);
  border-radius: 9999px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: var(--secondary-color);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-button:hover {
  background: var(--primary-color);
}

/* 表格组件 */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
}

.custom-table th,
.custom-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.custom-table th {
  background: var(--bg-light);
  font-weight: 600;
  color: var(--text-dark);
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.custom-table tbody tr:hover {
  background: var(--bg-light);
}

/* 分页组件 */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
  margin: 2rem 0;
}

.pagination-button {
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--text-dark);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.pagination-button:hover {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.pagination-button.active {
  background: var(--primary-color);
  color: var(--white);
  border-color: var(--primary-color);
}

.pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-button:disabled:hover {
  background: var(--white);
  color: var(--text-dark);
  border-color: var(--border-color);
} 