/* Upload Advanced Styles */
.upload-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.upload-header {
  text-align: center;
  margin-bottom: 32px;
}

.upload-header h2 {
  font-size: 28px;
  color: var(--forest);
  margin: 0 0 8px;
}

.upload-header p {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

/* Alerts */
.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 500;
}

.alert-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.alert-success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.alert-icon {
  font-size: 20px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.form-group-full {
  grid-column: 1 / -1;
}

/* Form Grid Compact */
.form-grid-compact {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.form-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.form-group-large {
  flex: 2;
}

.form-group-small {
  flex: 1;
}

.form-group-full {
  flex: 1;
  width: 100%;
}

.description-field {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  width: 100%;
}

.btn-description {
  background-color: #FFEB0F;
  border-color: #FFEB0F;
  color: #333;
  font-weight: 600;
}

.btn-description:hover {
  background-color: #E6D40E;
  border-color: #E6D40E;
  color: #333;
}

/* Form Groups */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
  color: var(--ink);
  font-size: 14px;
}

.label-required {
  color: #dc2626;
  font-size: 16px;
}

.form-input,
.form-textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: #fff;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(115, 192, 84, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

/* Radio Group */
.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.radio-group-horizontal {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

.radio-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  min-width: 120px;
  justify-content: center;
}

.radio-item:hover {
  border-color: var(--brand);
  background: rgba(115, 192, 84, 0.05);
}

.radio-input {
  display: none;
}

.radio-input:checked + .radio-custom {
  background: var(--brand);
  border-color: var(--brand);
}

.radio-input:checked + .radio-custom::after {
  opacity: 1;
}

.radio-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 50%;
  position: relative;
  transition: all 0.2s ease;
}

.radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.radio-label {
  font-weight: 500;
  color: var(--ink);
}

/* File Upload */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fafafa;
}

.file-upload-area:hover,
.file-upload-area.drag-over {
  border-color: var(--brand);
  background: rgba(115, 192, 84, 0.05);
}

.file-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.file-upload-icon {
  font-size: 48px;
  opacity: 0.6;
}

.file-upload-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.file-upload-subtitle {
  font-size: 14px;
  color: var(--muted);
}

.file-input {
  display: none;
}

.file-preview {
  border: 2px solid var(--brand);
  border-radius: 12px;
  padding: 16px;
  background: rgba(115, 192, 84, 0.05);
}

.file-preview-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-preview-icon {
  font-size: 24px;
}

.file-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-preview-name {
  font-weight: 600;
  color: var(--ink);
}

.file-preview-size {
  font-size: 12px;
  color: var(--muted);
}

.file-preview-remove {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
}

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

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--forest);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #f3f4f6;
  color: var(--ink);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-icon {
  font-size: 16px;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .form-row {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-group-large,
  .form-group-small {
    flex: 1;
  }
  
  .radio-group {
    grid-template-columns: 1fr;
  }
  
  .radio-group-horizontal {
    flex-direction: column;
    gap: 12px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
}
