/* Patient Info Styles */

/* Center just the patient card within the existing medical page layout */
.patient-card {
  background: var(--color-bg-primary);
  border-radius: 12px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  width: 100%;
  max-width: 600px; /* Reduced from full width for better appearance */
  margin: 0 auto; /* Center the card horizontally */
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.card-header h2 {
  margin: 0;
  color: var(--color-text-primary);
  font-size: 1.5rem;
}

.edit-button {
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.edit-button:hover {
  background-color: var(--color-primary-dark);
}

.patient-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detail-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-group.full-width {
  grid-column: 1 / -1;
}

.detail-group label {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-group span {
  font-size: 16px;
  color: var(--color-text-primary);
  padding: 8px 0;
  min-height: 24px;
}

.patient-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px;
  border: 2px solid var(--color-border-light);
  border-radius: 6px;
  font-size: 16px;
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--form-input-focus-shadow);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background-color: var(--color-bg-secondary);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.cancel-button,
.save-button {
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.cancel-button {
  background-color: var(--color-gray-600);
  color: white;
}

.cancel-button:hover:not(:disabled) {
  background-color: var(--color-gray-700);
}

.save-button {
  background-color: var(--color-success);
  color: white;
}

.save-button:hover:not(:disabled) {
  background-color: var(--color-success-dark);
}

.cancel-button:disabled,
.save-button:disabled {
  background-color: var(--color-gray-300);
  color: var(--color-text-muted);
  cursor: not-allowed;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 60px 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-gray-300);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 16px;
}

.error-message {
  background-color: var(--color-danger-light);
  color: var(--color-danger-dark);
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--color-danger);
  margin-bottom: 20px;
}

.success-message {
  background-color: var(--color-success-light);
  color: var(--color-success-dark);
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid var(--color-success);
  margin-bottom: 20px;
}

/* Responsive Design */

