/* AI Clinical — SOAP Notes & Diagnosis Suggestions */

.ai-clinical-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-clinical-btn.primary {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
}

.ai-clinical-btn.primary:hover {
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.3);
}

.ai-clinical-btn.secondary {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
  border: 1px solid rgba(39, 174, 96, 0.3);
}

.ai-clinical-btn.secondary:hover {
  background: rgba(39, 174, 96, 0.25);
}

.ai-clinical-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* SOAP Notes Card */
.soap-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  border-left: 3px solid #27ae60;
}

.soap-card .soap-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #27ae60;
  margin-bottom: 6px;
}

.soap-card .soap-text {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
  white-space: pre-wrap;
}

/* Diagnosis Suggestion Card */
.diag-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.15s;
}

.diag-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(39, 174, 96, 0.3);
}

.diag-card .diag-info {
  flex: 1;
}

.diag-card .diag-code {
  font-size: 11px;
  font-weight: 700;
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 2px;
}

.diag-card .diag-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.diag-card .diag-confidence {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  margin-left: 8px;
}

.diag-card .diag-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.diag-card .diag-actions button {
  padding: 4px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.diag-card .diag-actions .btn-copy {
  background: rgba(39, 174, 96, 0.15);
  color: #27ae60;
}

.diag-card .diag-actions .btn-copy:hover {
  background: rgba(39, 174, 96, 0.3);
}

.diag-card .diag-actions .btn-add {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.diag-card .diag-actions .btn-add:hover {
  background: rgba(52, 152, 219, 0.3);
}

/* Speak Now Button */
.speak-now-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 2px dashed rgba(39, 174, 96, 0.3);
  border-radius: 12px;
  background: rgba(39, 174, 96, 0.05);
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.speak-now-btn:hover {
  border-color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.speak-now-btn.recording {
  border-color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
  animation: speak-pulse 1.5s ease infinite;
}

.speak-now-btn .mic-icon {
  font-size: 20px;
}

@keyframes speak-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* SOAP Editor Textarea */
.soap-editor {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 13px;
  outline: none;
  resize: vertical;
  font-family: inherit;
  min-height: 60px;
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.soap-editor:focus {
  border-color: #27ae60;
}

/* Action bar for accept/edit/regenerate */
.ai-notes-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.ai-notes-actions .btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.ai-notes-actions .btn-accept {
  background: #27ae60;
  color: #fff;
}

.ai-notes-actions .btn-accept:hover {
  background: #219a52;
}

.ai-notes-actions .btn-accept:disabled {
  background: rgba(39, 174, 96, 0.3);
  cursor: not-allowed;
}

.ai-notes-actions .btn-edit {
  background: rgba(52, 152, 219, 0.2);
  color: #3498db;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.ai-notes-actions .btn-edit:hover {
  background: rgba(52, 152, 219, 0.3);
}

.ai-notes-actions .btn-regenerate {
  background: rgba(243, 156, 18, 0.2);
  color: #f39c12;
  border: 1px solid rgba(243, 156, 18, 0.3);
}

.ai-notes-actions .btn-regenerate:hover {
  background: rgba(243, 156, 18, 0.3);
}

.ai-notes-actions .btn-reject {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.ai-notes-actions .btn-reject:hover {
  background: rgba(231, 76, 60, 0.3);
}

/* AI Status Indicator */
.ai-clinical-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.ai-clinical-status .spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(39, 174, 96, 0.3);
  border-top-color: #27ae60;
  border-radius: 50%;
  animation: clinical-spin 0.6s linear infinite;
}

@keyframes clinical-spin {
  to { transform: rotate(360deg); }
}

/* Section title */
.clinical-section-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.4);
  margin: 16px 0 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Mobile fullscreen */
@media (max-width: 768px) {
  .ai-notes-actions {
    position: sticky;
    bottom: 0;
    background: #0a1628;
    padding: 12px 0;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .diag-card {
    flex-wrap: wrap;
  }

  .diag-card .diag-actions {
    width: 100%;
    margin-top: 6px;
    justify-content: flex-end;
  }

  .speak-now-btn {
    padding: 14px;
    font-size: 16px;
  }
}
