/* CSV Upload Component Styles */

.csv-upload {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.csv-upload__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  border: 2px dashed var(--color-border, #ddd);
  border-radius: 16px;
  background: var(--color-bg-elevated, #f8f9fa);
  cursor: pointer;
  transition: all 0.3s ease;
}

.csv-upload__dropzone:hover {
  border-color: var(--color-primary, #007aff);
  background: var(--color-bg-hover, #f0f0f5);
}

.csv-upload__dropzone--dragover {
  border-color: var(--color-primary, #007aff);
  background: var(--color-primary-light, #e6f2ff);
  transform: scale(1.02);
}

.csv-upload__icon {
  margin-bottom: 20px;
  color: var(--color-primary, #007aff);
}

.csv-upload__title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--color-text-primary, #000);
}

.csv-upload__subtitle {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
  margin: 0 0 24px 0;
}

.csv-upload__button {
  padding: 12px 32px;
  background: var(--color-primary, #007aff);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.csv-upload__button:hover {
  background: var(--color-primary-hover, #0056b3);
  transform: translateY(-1px);
}

.csv-upload__hint {
  font-size: 12px;
  color: var(--color-text-tertiary, #999);
  margin: 16px 0 0 0;
}

/* Preview */
.csv-upload__preview {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.csv-upload__preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.csv-upload__preview-header h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.csv-upload__cancel {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--color-bg-secondary, #f0f0f5);
  border-radius: 8px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.csv-upload__cancel:hover {
  background: var(--color-bg-hover, #e0e0e5);
}

.csv-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.csv-preview-stat {
  text-align: center;
  padding: 16px;
  background: var(--color-bg-secondary, #f8f9fa);
  border-radius: 12px;
}

.csv-preview-stat__label {
  font-size: 12px;
  color: var(--color-text-secondary, #666);
  margin-bottom: 4px;
}

.csv-preview-stat__value {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-primary, #000);
}

.csv-preview-transactions h5 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: var(--color-text-secondary, #666);
}

.csv-preview-transaction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--color-border, #eee);
}

.csv-preview-transaction:last-child {
  border-bottom: none;
}

.csv-preview-transaction__info {
  flex: 1;
}

.csv-preview-transaction__description {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary, #000);
  margin-bottom: 4px;
}

.csv-preview-transaction__date {
  font-size: 12px;
  color: var(--color-text-tertiary, #999);
}

.csv-preview-transaction__amount {
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.csv-preview-transaction__amount.negative {
  color: var(--color-expense, #ff3b30);
}

.csv-preview-transaction__amount.positive {
  color: var(--color-income, #34c759);
}

.csv-upload__preview-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}

.csv-upload__confirm {
  padding: 12px 32px;
  background: var(--color-primary, #007aff);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.csv-upload__confirm:hover {
  background: var(--color-primary-hover, #0056b3);
}

/* Loading */
.csv-upload__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
}

.csv-upload__spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--color-border, #ddd);
  border-top-color: var(--color-primary, #007aff);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

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

.csv-upload__loading p {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
}

/* Success */
.csv-upload__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.csv-upload__success-icon {
  width: 64px;
  height: 64px;
  background: var(--color-success, #34c759);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
  animation: successPop 0.5s ease;
}

@keyframes successPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.csv-upload__success h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--color-text-primary, #000);
}

.csv-upload__success p {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
  margin: 0;
}

/* Error */
.csv-upload__error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.csv-upload__error-icon {
  width: 64px;
  height: 64px;
  background: var(--color-error, #ff3b30);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 20px;
}

.csv-upload__error h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--color-text-primary, #000);
}

.csv-upload__error p {
  font-size: 14px;
  color: var(--color-text-secondary, #666);
  margin: 0 0 24px 0;
}

.csv-upload__retry {
  padding: 12px 32px;
  background: var(--color-primary, #007aff);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.csv-upload__retry:hover {
  background: var(--color-primary-hover, #0056b3);
}
