/* Google Fonts - Import Vazirmatn for Persian */
@import url("https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Vazirmatn", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  direction: rtl;
  background-color: #f5f7fa;
  min-height: 100vh;
  padding: 20px;
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Header Section */
.form-header {
  background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
  padding: 32px 24px;
  text-align: center;
}

.form-header h1 {
  color: white;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Form Sections */
.order-form {
  padding: 32px 24px;
}

.form-section {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
  text-align: right;
}

.form-input,
.form-select {
  width: 100%;
  padding: 14px 16px;
  font-size: 15px;
  font-family: "Vazirmatn", sans-serif;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  background-color: #f7fafc;
  color: #2d3748;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: #4299e1;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 8l4 4 4-4' stroke='%232d3748' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 12px center;
  padding-left: 40px;
}

/* Form Divider */
.form-divider {
  height: 1px;
  background: linear-gradient(to left, transparent, #e2e8f0, transparent);
  margin: 32px 0;
}

/* Section Header */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-icon {
  color: #4a5568;
  display: flex;
  align-items: center;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
}

/* Delivery Options */
.delivery-options {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.radio-option input[type="radio"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #e53e3e;
}

.radio-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #e53e3e;
}

.radio-label {
  font-size: 15px;
  color: #2d3748;
  font-weight: 500;
}

/* Price Section */
.price-section {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 12px;
  margin-bottom: 20px;
}

.price-icon {
  color: #4a5568;
  display: flex;
  align-items: center;
}

.price-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.price-label {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: #e53e3e;
}

/* Delivery Info */
.delivery-info {
  font-size: 13px;
  color: #718096;
  line-height: 1.6;
  text-align: justify;
  margin-bottom: 24px;
  padding: 16px;
  background: #fff5f5;
  border-radius: 8px;
  border-right: 4px solid #e53e3e;
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  font-family: "Vazirmatn", sans-serif;
  color: white;
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(229, 62, 62, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #2d3748;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal-close:hover {
  background: #f7fafc;
}

.modal-body {
  padding: 24px;
}

.modal-subtitle {
  font-size: 14px;
  color: #718096;
  margin-bottom: 20px;
}

/* Upload Area */
.upload-area {
  border: 2px dashed #cbd5e0;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.upload-area:hover {
  border-color: #4299e1;
  background: #f7fafc;
}

.upload-area.dragover {
  border-color: #4299e1;
  background: #ebf8ff;
}

.upload-icon {
  color: #4299e1;
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.upload-title {
  font-size: 16px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.upload-subtitle {
  font-size: 14px;
  color: #718096;
  margin-bottom: 8px;
}

.upload-formats {
  font-size: 13px;
  color: #a0aec0;
}

/* File List */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: #f7fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.file-icon {
  width: 32px;
  height: 32px;
  background: #edf2f7;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-icon svg {
  width: 16px;
  height: 16px;
  color: #4a5568;
}

.file-details {
  flex: 1;
}

.file-name {
  font-size: 14px;
  font-weight: 500;
  color: #2d3748;
  margin-bottom: 2px;
}

.file-size {
  font-size: 12px;
  color: #a0aec0;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.file-action-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #718096;
  transition: color 0.2s;
}

.file-action-btn:hover {
  color: #2d3748;
}

.file-action-btn.remove:hover {
  color: #e53e3e;
}

/* Modal Footer */
.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.btn-cancel,
.btn-upload {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: "Vazirmatn", sans-serif;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-cancel {
  background: white;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

.btn-cancel:hover {
  background: #f7fafc;
}

.btn-upload {
  background: #4299e1;
  color: white;
  border: none;
}

.btn-upload:hover {
  background: #3182ce;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .container {
    border-radius: 0;
    min-height: 100vh;
  }

  .form-header {
    padding: 24px 20px;
  }

  .form-header h1 {
    font-size: 24px;
  }

  .order-form {
    padding: 24px 20px;
  }

  .delivery-options {
    flex-direction: column;
    gap: 12px;
  }

  .radio-option {
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
  }

  .radio-option input[type="radio"]:checked {
    border-color: #e53e3e;
  }

  .radio-option input[type="checkbox"]:checked {
    border-color: #e53e3e;
  }

  .modal-content {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    margin-top: auto;
  }

  .upload-area {
    padding: 32px 16px;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .btn-cancel,
  .btn-upload {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .form-header h1 {
    font-size: 20px;
  }

  .form-label {
    font-size: 14px;
  }

  .form-input,
  .form-select {
    font-size: 14px;
    padding: 12px 14px;
  }

  .price-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .price-content {
    width: 100%;
    justify-content: space-between;
  }
}
