/* Form Container Enhancement */
.form-container {
  background: linear-gradient(to bottom, #ffffff, #fafafa);
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Tab Header Enhancement */
.tab-header {
  background-color: #f9fafb;
  border-radius: 8px 8px 0 0;
  padding: 4px;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  background-color: transparent;
  color: #6b7280;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.tab-btn:hover {
  background-color: #f3f4f6;
  color: #722ed1;
}

.tab-btn.active {
  background-color: #722ed1;
  color: white;
  box-shadow: 0 2px 4px rgba(114, 46, 209, 0.2);
}

.tab-btn.active i {
  color: white;
}

.tab-btn i {
  font-size: 16px;
  color: #9ca3af;
  transition: color 0.2s ease;
}

.tab-btn:hover i {
  color: #722ed1;
}

/* Form Groups Enhancement */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  color: #374151;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-control {
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.form-control:focus {
  border-color: #722ed1;
  box-shadow: 0 0 0 3px rgba(114, 46, 209, 0.1);
  outline: none;
}

/* Multiselect Enhancement */
.multiselect-container {
  background-color: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.checkbox-item {
  background-color: white;
  padding: 8px 12px;
  border-radius: 4px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.checkbox-item:hover {
  background-color: #f9f0ff;
  border-color: #722ed1;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 8px;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"]:checked {
  accent-color: #722ed1;
}

/* Tab Navigation Buttons */
.tab-navigation {
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
  margin-top: 30px;
}

.tab-navigation .btn {
  padding: 10px 24px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
}

.btn-primary {
  background-color: #722ed1;
  color: white;
  border: 1px solid #722ed1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background-color: #5b25a7;
  border-color: #5b25a7;
  box-shadow: 0 4px 6px rgba(114, 46, 209, 0.2);
}

.btn-success {
  background-color: #10b981;
  color: white;
  border: 1px solid #10b981;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

/* ========================================
   REVIEW TAB SPECIFIC ENHANCEMENTS
   ======================================== */

#tab-review {
  padding: 20px;
}

#tab-review h2 {
  color: #1f2937;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

#tab-review h2::before {
  content: "✓";
  display: inline-flex;
  width: 32px;
  height: 32px;
  background-color: #10b981;
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
}

.review-container {
  background-color: #f9fafb;
  border-radius: 8px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.review-container > p {
  color: #6b7280;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

/* Review Sections - Card Style */
.review-section {
  background-color: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

.review-section:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.review-section h3 {
  color: #722ed1;
  font-size: 1.1rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f9f0ff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-section h3::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background-color: #722ed1;
  border-radius: 2px;
}

/* Vignette Name Review */
#review-name {
  font-size: 1.25rem;
  color: #1f2937;
  font-weight: 600;
  padding: 12px 16px;
  background-color: #f9f0ff;
  border-radius: 6px;
  border-left: 4px solid #722ed1;
}

/* Review Details */
.review-details {
  display: grid;
  gap: 12px;
}

.review-field {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 2fr;
  gap: 12px;
  padding: 12px;
  background-color: #f9fafb;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.review-field:hover {
  background-color: #f3f4f6;
}

.review-field strong {
  color: #4b5563;
  font-weight: 600;
  font-size: 0.9rem;
}

.review-field span {
  color: #1f2937;
  font-size: 0.95rem;
}

/* Empty state for review sections */
.review-details .text-gray-400 {
  padding: 20px;
  text-align: center;
  background-color: #f9fafb;
  border-radius: 6px;
  font-style: italic;
}

/* Special styling for multiselect values in review */
.review-field span {
  line-height: 1.6;
}

/* Medical History section special styling */
#review-medical_history .review-field {
  background-color: #fef3c7;
  border-left: 3px solid #f59e0b;
}

/* Demographics section special styling */
#review-demographics .review-field {
  background-color: #dbeafe;
  border-left: 3px solid #3b82f6;
}

/* Personality section special styling */
#review-personality .review-field {
  background-color: #ede9fe;
  border-left: 3px solid #8b5cf6;
}

/* Social factors section special styling */
#review-social_factors .review-field {
  background-color: #d1fae5;
  border-left: 3px solid #10b981;
}

/* Review tab navigation enhancement */
#tab-review .tab-navigation {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  margin-top: 24px;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

#tab-review .tab-navigation .btn {
  min-width: 140px;
}

/* Success button with icon */
#tab-review .btn-success {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#tab-review .btn-success::before {
  content: "✓";
  font-size: 16px;
  font-weight: bold;
}

/* Form title section enhancement */
.form-title-section {
  background-color: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
}

.form-title-section label {
  color: #1f2937;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-title-section input {
  font-size: 1.05rem;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
}

.form-title-section input:focus {
  border-color: #722ed1;
  box-shadow: 0 0 0 3px rgba(114, 46, 209, 0.1);
}

.form-help-text {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 6px;
}

/* Error states */
.form-control.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

.error-message {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 4px;
  display: block;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .review-field {
    grid-template-columns: 1fr;
  }
  
  .review-field strong {
    margin-bottom: 4px;
  }
  
  .tab-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .tab-btn i {
    display: none;
  }
}
