/* Modern, clean styles for Sheet Exporter */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 1rem;
}

p {
  color: #64748b;
  margin-bottom: 1rem;
}

/* Card styles */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

/* Button styles */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.btn-primary {
  background-color: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.btn-secondary {
  background-color: #10b981;
  color: white;
}

.btn-secondary:hover {
  background-color: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Form styles */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #475569;
}

input[type="file"] {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 2px dashed #e2e8f0;
  border-radius: 0.5rem;
  background-color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="file"]:hover {
  border-color: #cbd5e1;
  background-color: #f1f5f9;
}

input[type="file"]:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: white;
}

/* Upload area */
.upload-area {
  border: 3px dashed #e2e8f0;
  border-radius: 1rem;
  padding: 3rem;
  text-align: center;
  background-color: #fafbfc;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.upload-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #94a3b8;
}

/* Checkbox styles */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.checkbox-item:hover {
  background-color: #f1f5f9;
}

.checkbox-item input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.75rem;
  cursor: pointer;
}

.checkbox-item label {
  margin: 0;
  cursor: pointer;
  flex: 1;
  font-weight: 400;
}

/* Table styles */
.table-container {
  overflow-x: auto;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}

table caption {
  padding: 1rem;
  font-weight: 600;
  text-align: left;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  background-color: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

tr:hover {
  background-color: #f8fafc;
}

/* Full data table specific styles */
#dataTable {
  table-layout: auto;
  min-width: 100%;
}

#dataTable thead {
  position: sticky;
  top: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#dataTable th {
  position: sticky;
  top: 0;
  z-index: 10;
}

#dataTable tbody tr {
  transition: background-color 0.15s ease;
}

#dataTable tbody tr:hover {
  background-color: #f0f4f8;
}

/* Row selection checkbox styles */
#dataTable input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: #3b82f6;
}

#dataTable td:first-child,
#dataTable th:first-child {
  text-align: center;
  padding: 0.5rem;
}

/* Scrollbar styling for better UX */
.table-container::-webkit-scrollbar {
  height: 12px;
  width: 12px;
}

.table-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
}

.table-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Error styles */
.error-container {
  text-align: center;
  padding: 4rem 2rem;
}

.error-icon {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  color: #ef4444;
}

.error-message {
  font-size: 1.125rem;
  color: #64748b;
  margin-bottom: 2rem;
}

/* File info badge */
.file-info {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: #e0e7ff;
  color: #4338ca;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Select all/none buttons */
.select-controls {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.select-btn {
  padding: 0.5rem 1rem;
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.select-btn:hover {
  background-color: #e2e8f0;
  color: #334155;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid #f3f4f6;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Button group */
.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .card {
    padding: 1.5rem;
  }
  
  .checkbox-group {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  .button-group {
    flex-direction: column;
  }
  
  .button-group .btn {
    width: 100%;
    margin: 0;
  }
}