/* RowPix - Components CSS */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-system);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: #0EA5E9;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--navy);
  border: 2px solid var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--blue);
  color: var(--blue);
}

.btn-success {
  background: var(--green);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #16A34A;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue), #0EA5E9);
  border-radius: var(--radius);
  flex-shrink: 0;
}

.card-icon svg {
  width: 24px;
  height: 24px;
  color: white;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0;
}

.card-description {
  color: var(--gray-700);
  margin-bottom: var(--space-md);
  line-height: 1.5;
}

/* Tool Grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

/* Drop Zone */
.drop-zone {
  border: 3px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  background: var(--gray-50);
  transition: all var(--transition);
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--blue);
  background: #F0F9FF;
}

.drop-zone-icon {
  width: 64px;
  height: 64px;
  margin-bottom: var(--space-sm);
  color: var(--gray-300);
}

.drop-zone.drag-over .drop-zone-icon {
  color: var(--blue);
}

.drop-zone-text {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-bottom: var(--space-xs);
}

.drop-zone-subtext {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.drop-zone input[type="file"] {
  display: none;
}

/* File List */
.file-list {
  margin-top: var(--space-lg);
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm);
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: var(--space-xs);
}

.file-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 1;
  min-width: 0;
}

.file-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: var(--blue);
}

.file-details {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.875rem;
  color: var(--gray-700);
}

.file-remove {
  background: none;
  border: none;
  color: var(--gray-700);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: all var(--transition);
}

.file-remove:hover {
  background: var(--gray-100);
  color: #EF4444;
}

/* Form Controls */
.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.form-input,
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-system);
  font-size: 1rem;
  transition: border-color var(--transition);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--blue);
}

.form-help {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-top: var(--space-xs);
}

/* Options Grid */
.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

/* Progress Bar */
.progress-container {
  margin: var(--space-lg) 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.3s ease;
  border-radius: 999px;
}

.progress-text {
  text-align: center;
  margin-top: var(--space-xs);
  font-size: 0.875rem;
  color: var(--gray-700);
  font-weight: 600;
}

/* Alert/Notice */
.alert {
  padding: var(--space-md);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
  border-left: 4px solid;
}

.alert-info {
  background: #F0F9FF;
  border-color: var(--blue);
  color: #075985;
}

.alert-success {
  background: #F0FDF4;
  border-color: var(--green);
  color: #166534;
}

.alert-warning {
  background: #FFFBEB;
  border-color: #F59E0B;
  color: #92400E;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-new {
  background: var(--green);
  color: white;
}

.badge-beta {
  background: var(--blue);
  color: white;
}

/* Three Pillars Section */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin: var(--space-xl) 0;
}

.pillar {
  text-align: center;
  padding: var(--space-lg);
}

.pillar-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-sm);
  color: var(--blue);
}

.pillar h3 {
  margin-bottom: var(--space-xs);
}

.pillar p {
  color: var(--gray-700);
  margin: 0;
}

/* How It Works Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
  margin: var(--space-xl) 0;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto var(--space-sm);
}

.step h4 {
  margin-bottom: var(--space-xs);
}

.step p {
  color: var(--gray-700);
  font-size: 0.875rem;
  margin: 0;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 768px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .pillars,
  .steps {
    grid-template-columns: 1fr;
  }
}
