/* Task Application Form Styles */

.task-application-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.task-application-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  width: 85%;
  max-width: 550px; /* Reduced from 700px for smaller modal */
  max-height: 80vh; /* Reduced for smaller appearance */
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.task-application-modal.active .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem; /* Reduced padding */
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem; /* Reduced font size */
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  color: #64748b;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #ef4444;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.application-form {
  margin-top: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #334155;
}

.form-group .hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #64748b;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background-color: #f8fafc;
  font-family: inherit;
  font-size: 1rem;
  color: #0f172a;
  transition: border-color 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.task-details-preview {
  background-color: #f8fafc;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.task-details-preview h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.task-details-item {
  display: flex;
  margin-bottom: 0.5rem;
}

.task-details-item:last-child {
  margin-bottom: 0;
}

.task-details-label {
  font-weight: 500;
  min-width: 120px;
  color: #64748b;
}

.task-details-value {
  color: #0f172a;
}

.bid-input-group {
  display: flex;
}

.bid-input-group span {
  padding: 0.75rem;
  background-color: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-right: none;
  border-radius: 6px 0 0 6px;
  color: #64748b;
}

.bid-input-group input {
  border-radius: 0 6px 6px 0;
}

.application-agreement {
  margin: 1.5rem 0;
  padding: 1rem;
  background-color: #f8fafc;
  border-radius: 6px;
  border-left: 4px solid #2563eb;
}

.application-agreement h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #334155;
}

.application-agreement p {
  margin: 0;
  font-size: 0.9rem;
  color: #475569;
}

.form-check {
  display: flex;
  align-items: flex-start;
  margin-top: 1rem;
}

.form-check input[type="checkbox"] {
  margin-top: 0.25rem;
  margin-right: 0.5rem;
}

.form-check label {
  margin-bottom: 0;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .modal-content {
    width: 95%;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer button {
    width: 100%;
  }
  
  .task-details-item {
    flex-direction: column;
  }
  
  .task-details-label {
    min-width: auto;
    margin-bottom: 0.25rem;
  }
}

/* Additional compact styling for application modal */
.task-details-body {
  padding: 1rem;
}

.task-details-row {
  margin-bottom: 0.75rem; /* Reduced margin */
}

.detail-item h4 {
  margin: 0 0 0.25rem; /* Reduced margin */
  font-size: 0.85rem; /* Smaller heading */
  color: #666;
}

.detail-item p {
  margin: 0;
  font-size: 0.95rem;
}

.description-section, .schedule-section, .materials-section, .skills-section {
  margin-bottom: 0.75rem; /* Reduced margin */
}

.description-section h4, .schedule-section h4, .materials-section h4, .skills-section h4 {
  margin: 0 0 0.25rem; /* Reduced margin */
  font-size: 0.9rem;
  color: #444;
}

.task-budget-display {
  background: #f8f9fa;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1.1rem; /* Slightly smaller */
}

.task-details-header {
  margin-bottom: 1rem;
}

/* Make form fields more compact */
.application-form-section h3 {
  margin: 1rem 0 0.75rem;
  font-size: 1.1rem;
}

.form-group {
  margin-bottom: 0.75rem; /* Reduced margin */
}
