/* 匯出資料彈窗樣式 - 仿照進階篩選和生成連結彈窗 */

.export-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.export-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}

.export-modal-content {
  position: relative;
  z-index: 1;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: min(760px, 90vw);
  margin: auto;
}

.export-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 12px 12px 0 0;
}

.export-modal-header h3 {
  margin: 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.export-modal-header h3 i {
  color: var(--primary-color);
}

.export-modal-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #6c757d;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.export-modal-close:hover {
  background: #e9ecef;
  color: #495057;
}

.export-modal-body {
  padding: 20px;
  max-height: 72vh;
  overflow-y: auto;
}

.export-modal-body .form-group {
  margin-bottom: 16px;
}

.export-modal-body .form-group:last-child {
  margin-bottom: 0;
}

.export-modal-body label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #495057;
  font-size: 0.9rem;
}

.export-modal-body select,
.export-modal-body input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s ease;
}

.export-checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.export-checkbox-label input {
  width: auto;
}

.export-filter-panel {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  background: #f8fafc;
}

.export-filter-title {
  font-weight: 600;
  color: #495057;
  margin-bottom: 12px;
}

.export-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.export-filter-item label {
  font-size: 0.85rem;
}

.export-filter-control {
  width: 100%;
}

.export-filter-checkbox-list {
  max-height: 130px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  background: white;
  padding: 8px;
}

.export-filter-checkbox-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px !important;
  font-weight: 400 !important;
  cursor: pointer;
}

.export-filter-checkbox-item:last-child {
  margin-bottom: 0 !important;
}

.export-filter-checkbox-item input {
  width: auto;
  padding: 0;
}

.export-modal-body select:focus,
.export-modal-body input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

.export-modal-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #e9ecef;
  background: #f8f9fa;
  border-radius: 0 0 12px 12px;
}

.export-modal-footer .btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.export-modal-footer .btn-secondary {
  background-color: #6c757d;
  color: white;
  border-color: #6c757d;
}

.export-modal-footer .btn-secondary:hover {
  background-color: #5a6268;
  border-color: #545b62;
}

.export-modal-footer .btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.export-modal-footer .btn-primary:hover {
  background-color: #0b7dda;
  border-color: #0a6bc2;
}

/* 響應式設計 */
@media (max-width: 768px) {
  .export-modal-content {
    width: min(95vw, 760px);
    margin: 16px auto;
  }

  .export-modal-header,
  .export-modal-body,
  .export-modal-footer {
    padding: 16px;
  }

  .export-filter-grid {
    grid-template-columns: 1fr;
  }
}

