/* ==========================================
   AI Symptom Analyzer Styles
   ========================================== */

/* --- Wrapper --- */
.ai-symptom-analyzer-wrapper {
  max-width: 800px;
  margin: 2rem auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* --- Header --- */
.asa-header {
  text-align: center;
  margin-bottom: 2rem;
}

.asa-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin: 0 0 0.5rem;
}

.asa-subtitle {
  font-size: 1.1rem;
  color: #4a5568;
  margin: 0;
}

/* --- Symptoms Input --- */
.asa-symptoms-input {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.2s ease;
  resize: vertical;
  box-sizing: border-box;
}

.asa-symptoms-input:focus {
  border-color: #4299e1;
  outline: none;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

/* --- Patient Info --- */
.asa-patient-info {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 1rem;
}

.asa-patient-info legend {
  font-weight: 600;
  color: #2d3748;
}

/* --- Submit Button --- */
.asa-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem !important;
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: #fff !important;
  background: linear-gradient(135deg, #4299e1, #3182ce) !important;
  border: none !important;
  border-radius: 8px !important;
  cursor: pointer;
  transition: all 0.2s ease;
}

.asa-submit:hover {
  background: linear-gradient(135deg, #3182ce, #2b6cb0) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

.asa-submit:active {
  transform: translateY(0);
}

/* --- Results Container --- */
.asa-results {
  margin-top: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.asa-results-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Result Card --- */
.asa-result-container {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.asa-result-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #f0f4f8;
}

.asa-result-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: #1a202c;
}

.asa-result-icon {
  font-size: 1.5rem;
}

/* --- Analysis Text --- */
.asa-analysis {
  background: #f7fafc;
  border-left: 4px solid #4299e1;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.asa-analysis h4 {
  margin: 0 0 0.5rem;
  color: #2d3748;
  font-size: 1.1rem;
}

.asa-analysis p {
  margin: 0;
  color: #4a5568;
  line-height: 1.7;
}

/* --- Specialties Grid --- */
.asa-specialties h4 {
  margin: 0 0 1rem;
  color: #2d3748;
  font-size: 1.1rem;
}

.asa-specialties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

/* --- Specialty Card --- */
.asa-specialty-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.asa-specialty-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

/* Urgency border accents */
.asa-urgency-critical {
  border-left: 4px solid #e53e3e;
}

.asa-urgency-high {
  border-left: 4px solid #ed8936;
}

.asa-urgency-normal {
  border-left: 4px solid #48bb78;
}

.asa-specialty-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.asa-specialty-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a202c;
}

.asa-specialty-reason {
  color: #4a5568;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0.5rem 0;
}

.asa-specialty-footer {
  margin-top: 0.75rem;
}

/* --- Confidence Badges --- */
.asa-confidence-badge {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.asa-high {
  background: #c6f6d5;
  color: #22543d;
}

.asa-medium {
  background: #fefcbf;
  color: #744210;
}

.asa-low {
  background: #fed7d7;
  color: #822727;
}

/* --- Urgency Badges --- */
.asa-urgency-badge {
  display: inline-block;
  padding: 0.2rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 6px;
}

.asa-urgency-badge.asa-urgency-critical {
  background: #fff5f5;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.asa-urgency-badge.asa-urgency-high {
  background: #fffaf0;
  color: #c05621;
  border: 1px solid #fbd38d;
}

.asa-urgency-badge.asa-urgency-normal {
  background: #f0fff4;
  color: #276749;
  border: 1px solid #9ae6b4;
}

/* --- Disclaimer --- */
.asa-disclaimer {
  margin-top: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fffff0;
  border: 1px solid #f6e05e;
  border-radius: 8px;
}

.asa-disclaimer p {
  margin: 0;
  font-size: 0.85rem;
  color: #744210;
  line-height: 1.5;
}

/* --- Error --- */
.asa-error .messages {
  margin-top: 1rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .asa-title {
    font-size: 1.5rem;
  }

  .asa-specialties-grid {
    grid-template-columns: 1fr;
  }

  .asa-result-container {
    padding: 1rem;
  }
}

/* AJAX throbber styling */
.ajax-progress-throbber {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  color: #4a5568;
  font-size: 0.9rem;
}
